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 does not rename variables #564

Closed
rickyars opened this issue Aug 28, 2014 · 0 comments
Closed

select does not rename variables #564

rickyars opened this issue Aug 28, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@rickyars
Copy link

@rickyars rickyars commented Aug 28, 2014

I can't rename a variable to "var"

df <- data.frame(x = letters[1:10], y = 1:10)

df <- df %>%
  select(var = x, val = y)

Returns:

Error in setNames(as.list(seq_along(vars)), vars) : object 'x' not found

However, anything else works, e.g.:

df <- data.frame(x = letters[1:10], y = 1:10)

df <- df %>%
  select(wtf = x, val = y)
@hadley hadley added this to the 0.3 milestone Aug 28, 2014
@hadley hadley added the bug label Aug 28, 2014
@hadley hadley self-assigned this Aug 28, 2014
@hadley hadley closed this in 6c9904a Aug 28, 2014
@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants