-
Notifications
You must be signed in to change notification settings - Fork 129
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
Unexpected error in as_tibble()
when rownames =
is passed with implicit row names
#567
Comments
Thanks. Looks like this has been added in #388, the old behavior was plain wrong. In your example, |
I think I understand. This error makes more sense for Happy to try a PR, but to clarify, you mean you want me to create my issue-branch based on the branch |
Thanks. Please base off of the |
I'm ready to submit, but left some commented lines in this commit in case we need some back and forth prior to merging. If you agree with my fixes, I will clean up and push again, ok? |
Hi. Which branch would you like me to base from and PR against? It appears the the |
Thanks. I've moved to |
No problem. Shall I branch off |
This fell through the cracks. Would you still like to submit a PR? |
Sure I'd be happy to. Just gimme some time to remember what this was all about, re-fork the upstream repo, etc. Still want me to branch off master? |
Thanks, master is the right branch. |
as_tibble()
when rownames =
is passed with default rownamesas_tibble()
when rownames =
is passed with implicit row names
- logic for implicit rownames in 'as_tibble.data.frame()' - rm 'error_as_tibble_needs_rownames()' helper - update 'errors.txt' - update unit tests; no more rowname errors, add implicit rownames tests - rm 'error_as_tibble_needs_rownames()' from 'test-msg.R' - fixes tidyverse#567
- logic for implicit rownames in 'as_tibble.data.frame()' - rm 'error_as_tibble_needs_rownames()' helper - update 'errors.txt' - update unit tests; no more rowname errors, add implicit rownames tests - rm 'error_as_tibble_needs_rownames()' from 'test-msg.R' - fixes tidyverse#567
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
The inconsistency arises in tibble
v2.0.1
under the (I think) new arguments passed toas_tibble()
, specifically when you wish to create a new "id" column from the existing row names of the object you are coercing. If that object, say a data frame, has default numeric character strings,as_tibble()
throws an error saying that the object does not have rownames (but it does!). Additionally, if you explicitly add the rownames, this error is not thrown. Please see the reprex below:Created on 2019-01-28 by the reprex package (v0.2.1)
Session info
The text was updated successfully, but these errors were encountered: