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

Could we have view() support tbl_lazy ? Maybe even make view() generic ? #695

Closed
moodymudskipper opened this issue Jan 8, 2020 · 2 comments
Milestone

Comments

@moodymudskipper
Copy link

moodymudskipper commented Jan 8, 2020

When exploring a database it's a bit tedious to do my_table %>% head(n) %>% collect() %>% view()

And view()ing a tbl_lazy object as it works now is not so useful.

If we had a generic view() we might also design some more useful views for objects like connections etc.

I did this for myself :

view <- function(x, title = NULL, ...){
  UseMethod("view")
}

view.default <- tibble::view

view.tbl_lazy <- function(x, title = NULL, n = 500, ...){
  tibble::view(dplyr::collect(head(x, n)), title, ...)
}

@krlmlr krlmlr added this to the 3.0.0 milestone Mar 21, 2020
@krlmlr krlmlr closed this as completed in c4dc06b Mar 28, 2020
@krlmlr
Copy link
Member

krlmlr commented Mar 28, 2020

I went with the same strategy that is used for printing.

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2021
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