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(index = row_number()) fails on an empty frame (version #762

sbisaacson opened this issue Nov 11, 2014 · 2 comments


Copy link

@sbisaacson sbisaacson commented Nov 11, 2014

The command

mutate(frame, index = row_number())

fails if nrow(frame) == 0:

mutate(data.frame(a = numeric(0)), index = row_number())
## Error: upper value must be greater than lower value
mutate(data.frame(a = 1), index = row_number())
##   a index
## 1 1     1
@romainfrancois romainfrancois added this to the 0.4 milestone Nov 11, 2014
@romainfrancois romainfrancois self-assigned this Nov 11, 2014
romainfrancois added a commit that referenced this issue Nov 11, 2014

  handles data frames with 0 rows. closes #762.
Copy link

@romainfrancois romainfrancois commented Nov 11, 2014

Should be fixed now in the dev_0_4_0 branch.

Copy link

@sbisaacson sbisaacson commented Nov 11, 2014

Thank you for fixing this.

@sbisaacson sbisaacson closed this Nov 11, 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.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants