Launches a Shiny application to explore and filter a 'data.frame' or 'tibble'. If no data is provided, it opens an import panel to load a dataset from either the global environment or the packages.
Details
This function provides:
A tab-based interface with data import and viewer options.
A checkbox panel to select/deselect columns.
An input for dplyr-compatible filter expressions.
A dynamically generated
dplyrcode preview.Metadata display for the variables.
The filtering uses dplyr::filter() and generates user-friendly code to replicate the steps.
It also provides copyable R code that includes column selection and filtering logic.
Examples
if (interactive()) {
dataviewer(mtcars)
dataviewer() # Opens the import panel
}