view_detail
View data with enhanced browser-based interface
Opens an interactive, browser-based viewer for R objects with search, filtering, sorting, pagination, and export capabilities (CSV/Excel). Provides a rich DataTables interface for data frames and enhanced views for plots, lists, and other R objects. This is the recommended function for exploring data in detail.
Usage
view_detail(x, title = NULL, max_rows = 5000)
Arguments
| Argument | Description |
|---|---|
x
|
The data to view (data.frame, plot, list, function, or other R object) |
title
|
Optional title for the view. If NULL, uses the object name. |
max_rows
|
Maximum number of rows to display for data frames (default: 5000). Large data frames are automatically truncated with a warning. |
Details
Unlike R's built-in View(), this function:
- Works consistently across all IDEs (VS Code, RStudio, Positron, terminal)
- Provides search and column filtering
- Allows export to CSV and Excel
- Offers sorting and pagination
- Respects IDE-native viewers (doesn't override them)
Returns
Invisibly returns NULL. Function is called for its side effect of opening a browser window with the rendered view.
Examples
# View a data frame with interactive table
view_detail(mtcars)
# View with custom title
view_detail(iris, title = "Iris Dataset")
# View a plot
library(ggplot2)
p <- ggplot(mtcars, aes(mpg, hp)) + geom_point()
view_detail(p)
# View a list
view_detail(list(a = 1, b = 2, c = list(d = 3)))
See Also
Source: R/framework_view.R