-
Notifications
You must be signed in to change notification settings - Fork 11
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
Global option to return a tibble if available or a data.frame #58
Comments
Not sure if consistency with |
I agree. I'm strongly considering adding a hard dependency on tibble. I feel that a lot of the work that will be done with this package is going to be exploratory. The printing capabilities of tibble are a huge win. However there was a helpful expert explanation on mastodon that i think can be used to get the desired affect. We can return a Is there another scenario where you would want another aspect of tibbles beside the printing? I think this could be a quick win. A helper function in as_tbl <- function(x) {
stopifnot(inherits(x, "data.frame")
if (inherits(x, "tbl") return(x)
cur_classes <- class(x)
structure(x, class = union("tbl", old_class))
} Then in |
The printing alone would be nice but I think the valid column name checking and ability to avoid picking up row names by accident are also useful features for tibbles. |
data.frames for now |
tibbles have a supperior printing method to the native data.frame. arcgislayers does not import tibble and should not. However, it would be preferable to use it if it is available.
Useful conversation on Mastodon. @jonthegeek's suggestion makes me think a package level global option would be the best way to approach this. Can possibly lean on Tidy Principles blog post
The text was updated successfully, but these errors were encountered: