particles
particles copied to clipboard
Error: `data` must be uniquely named but has duplicate columns
When I try to run examples presented in this README or its vignette, I get the following error.
Error:
data
must be uniquely named but has duplicate columns
R version 3.3.3, with latest particles, ggraph, and so on.
I've just encountered the same error in a different context. May be related to ggplot2 or rlang. This is due to duplicated colnames.
Dropping the duplicate column fixed this issue for me
The issue isn't with the R version, but the ggplot2 version. install ggplot2 version 2.2.1 and it should work! require(devtools) install_version("ggplot2", version = "2.2.1", repos = "http://cran.us.r-project.org")
Error persists. Is there an update on that?
Using an older version is only a temporary solution which might be limiting in some ways.
haven't had time to look into it, but @jsan4christ's solution is generally applicable...
Well, I have only unique values on my data set and I want to compare the distribution of 2 classes of data (only using aes(x,y, fill= category) ) in geom_boxplot or geom_dotplot with code that works in version 2.2.1 as suggested by @simonlee184. Although, if I try using facets then it won't work. Maybe other issues arise when installing the older version. I need to look into those now too.
In the newer version it tells me that there are duplicates when there aren't any. I checked it using all sorts of commands and removing any possible duplicate.
It is difficult to help without a reproducible example. In general it is complaining about duplicate column names, not duplicate values
A few things were corrupt in the process of trying to find out what was wrong. Got it all fixed now. Your suggestion to works, just renamed columns this time. Sorry for bothering.
You can use below code which should resolve the issue.
colnames(data) <- make.unique(names(data))
@iamdeepaka, belive me man, you`re the man! After four hours of struggle, I fixed the problem using your suggestions.
@iamdeepaka thank you so much! this solution saved me hours of search
@iamdeepaka I tried your code suggestion, and I was wondering if you had any thoughts about how to approach this error:
> colnames(cds) <- make.unique(names(cds))
Error in make.unique(names(cds)) : 'names' must be a character vector
Since "cds" is a cell_data_set, I wonder if you have to approach making unique names a different way. Thanks in advance!
@iamdeepaka I tried your code suggestion, and I was wondering if you had any thoughts about how to approach this error:
> colnames(cds) <- make.unique(names(cds)) Error in make.unique(names(cds)) : 'names' must be a character vector
same question Since "cds" is a cell_data_set, I wonder if you have to approach making unique names a different way. Thanks in advance!