View | R Documentation |
R's View() always tries to open any object; but some common objects make Rstudio crash or slow things down.
This function is designed to mask the default View(). This version removes by default any list-columns,
including geometry columns from data.frame
objects. It also blocks viewing large dataframes.
View(x, title = NULL, block_large_df = TRUE, rm_lc = TRUE)
x |
An R object |
title |
An optional title chosen for the window that will display the object |
block_large_df |
Should large dataframes be blocked from displaying? |
rm_lc |
Should list-columns be removed? |
Global options can be set to alter behaviour:
"cpview_mblim": an integer for maximum dataframe size in Mb (rough approximation)
"cpview_celllim": an integer for maximum number of dataframe columns
"cpview_warn": anything but 'NULL' to silence warnings when removing list-columns
Both the object (invisibly) and its display
iris_same <- iris %>% mutate(listcol = purrr::map(Petal.Width, ~`+`(Petal.Length, .x))) %>% as_tibble() %>% View() iris_same
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.