New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peculiar environment Issue in ggplot2_2.0.0: "Error in list2env(members, envir = e) " running R 3.1.1 #1444

Closed
anesthetize opened this Issue Dec 22, 2015 · 6 comments

Comments

Projects
None yet
6 participants
@anesthetize

anesthetize commented Dec 22, 2015

Error in ggplot2 running R 3.1.1:

install.packages("ggplot2")
library(ggplot2)

a<-1:3
b<-4:6
c <- as.data.frame(cbind(a,b))

qplot(a,b,data=c)

This yields the following error:

Error in list2env(members, envir = e) : 
  names(x) must be a character vector of the same length as x

Please note that I'm running R on a Windows Machine with mapped network drives, as such UNC paths are not supported in R and I made appropriate changes in the .Renviron file using R_LIBS.

Session Info as below:

sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    
LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                       
LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_2.0.0

loaded via a namespace (and not attached):
[1] colorspace_1.2-6 grid_3.1.1       gtable_0.1.2     munsell_0.4.2
    plyr_1.8.3       Rcpp_0.12.2      scales_0.3.0     tools_3.1.1    
@anesthetize

This comment has been minimized.

anesthetize commented Dec 22, 2015

Works on R 3.2.3, just not on 3.1.1

@anesthetize anesthetize changed the title from Peculiar environment Issue in ggplot2_2.0.0: "Error in list2env(members, envir = e) " to Peculiar environment Issue in ggplot2_2.0.0: "Error in list2env(members, envir = e) " running R 3.1.1 Dec 22, 2015

@snafu123

This comment has been minimized.

snafu123 commented Dec 29, 2015

I just noticed that this is the same problem I had installing on 3.0.2:

Error in list2env(members, envir = e) :
names(x) must be a character vector of the same length as x

i reported it yesterday so. the difference is that for me, the error occurred which prevented ggplot installation, not the runtime.

@jonrobinson2

This comment has been minimized.

jonrobinson2 commented Jan 4, 2016

Hm any update on why this is happening? I am seeing this on R 3.1.1 as well.

@hadley

This comment has been minimized.

Member

hadley commented Jan 4, 2016

I think this means we've accidentally made ggplot2 only work in 3.2.2. @wch did we do this in ggproto?

@wch

This comment has been minimized.

Member

wch commented Jan 4, 2016

I tested this on 3.1.0. It looks like the source of the problem is that list2env errors if you give it an empty list:

 list2env(list())
# Error in list2env(list()) : 
#   names(x) must be a character vector of the same length as x

We can work around it by adding a check in ggproto for empty lists.

@kenkcchew

This comment has been minimized.

kenkcchew commented Feb 1, 2017

when you create the list of dataframe, you must give a name to each dataframe within the list

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.