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

as_data_frame deprecated message #1149

Closed
kwstat opened this issue May 9, 2022 · 1 comment · Fixed by #1506
Closed

as_data_frame deprecated message #1149

kwstat opened this issue May 9, 2022 · 1 comment · Fixed by #1506

Comments

@kwstat
Copy link
Contributor

kwstat commented May 9, 2022

I want to convert a tibble to a data.frame. Since I'm used to the tidyverse having it's own non-R-style syntax (using underscores instead of dots), I tried this:

as_data_frame(as_tibble(iris))

and was told

Warning message:
`as_data_frame()` was deprecated in tibble 2.0.0.
Please use `as_tibble()` instead.
The signature and semantics have changed, see `?as_tibble`.

This warning message is very confusing and the help page is not clear either. It would be nice if both the warning and the help page said something like: "Maybe you meant as.data.frame", since that is actually the right syntax to convert a tibble into a dataframe.

as.data.frame(as_tibble(iris))

General comment: The decision to use "as_" instead of "as." has created much confusion.

@krlmlr
Copy link
Member

krlmlr commented Dec 4, 2022

Thanks. Yes, this is unfortunate. Even more so as it seems that as_data_frame() is now used by a multitude of other packages when it should actually be as.data.frame() .

How about: Please use `as_tibble()` or `as.data.frame()` instead. ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants