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

mutate fails with empty name-value pair #1838

Closed
davidlockhart opened this issue May 18, 2016 · 1 comment
Closed

mutate fails with empty name-value pair #1838

davidlockhart opened this issue May 18, 2016 · 1 comment

Comments

@davidlockhart
Copy link

test.df <- data.frame(x = 1:2, y=3:4)
mutate(test.df,
z = x+y,
w = x-y,
)

produces the error message:
Error in mutate_impl(.data, dots) :
attempt to use zero-length variable name

It would be really nice if this were just gracefully parsed away, perhaps with a warning, or if necessary gave a more informative error. When I googled the message I found lots of suggestions of empty dataframe column names due to ingestion errors, which became rather a snipe hunt, but no suggestions that it could be an empty new variable name, which would have pointed me in a better direction.

@hadley
Copy link
Member

hadley commented May 26, 2016

Duplicate of #1039

@hadley hadley closed this as completed May 26, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 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

2 participants