Skip to content
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

select() function error with poorly named variables in dataframes #492

Closed
MilesOtt opened this issue Jul 11, 2014 · 0 comments
Closed

select() function error with poorly named variables in dataframes #492

MilesOtt opened this issue Jul 11, 2014 · 0 comments

Comments

@MilesOtt
Copy link

@MilesOtt MilesOtt commented Jul 11, 2014

If a dataframe has a variable name "" then select will not work (this is being returned by a dataframe in a function someone else wrote) Here I'm running dplyr() 0.2

require(dplyr)
ds = data.frame(x=rnorm(5), y=rnorm(5))
tmp1 = select(ds, x) # this works

names(ds) = c("V1", "") # this is not a good idea, but it is legal?
tmp2 = select(ds, V1)  # this does not work

Here is the error message:

Error in list2env(names_list, parent = env) : 
  attempt to use zero-length variable name
@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant