Skip to content

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

@moodymudskipper

Description

@moodymudskipper

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, ...)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions