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