| Title: | An Interactive and Feature-Rich Data Viewer |
|---|---|
| Description: | Provides an interactive viewer for 'data.frame', 'tibble' and 'data.table' objects using 'shiny' <https://shiny.posit.co/> and 'DT' <https://rstudio.github.io/DT/>. It supports complex filtering, column selection, and automatic generation of reproducible 'dplyr' <https://dplyr.tidyverse.org/> code for data manipulation. The package is designed for ease of use in data exploration and reporting workflows. |
| Authors: | Madhan Kumar N [aut, cre], Siddhesh Pujari [aut], Gomathi S [aut], Mackenzie Haight [aut] |
| Maintainer: | Madhan Kumar N <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.1.0 |
| Built: | 2026-05-08 08:34:44 UTC |
| Source: | https://github.com/madhankumarnagaraji/dataviewr |
Launches a Shiny application to explore and filter a data.frame or tibble or data.table.
If no data is provided, it opens an import panel to load a dataset from either the global environment or the packages.
dataviewer(..., background = NULL, port = NULL)dataviewer(..., background = NULL, port = NULL)
... |
One or more |
background |
Logical. If |
port |
Integer. Port number for the Shiny app. If |
This function provides:
A tab-based interface with data import and viewer options.
Support for multiple datasets in separate tabs.
A checkbox panel to select/deselect columns.
An input for dplyr-compatible filter expressions.
A dynamically generated dplyr code 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.
If background = TRUE, returns the process ID (character) invisibly.
If background = FALSE, returns a Shiny application object.
For more information about the features of dataviewer, please refer to the documentation.
if (interactive()) { dataviewer(mtcars) # Opens in RStudio Viewer pane or default web browser dataviewer(iris, mtcars) # Opens multiple datasets in separate tabs dataviewer() # Opens the "Import Dataset" tab (foreground mode - console will be busy) # Run in foreground to enable the "Import Dataset" tab alongside 'mtcars' dataviewer(mtcars, background = FALSE) # Stop background process id <- dataviewer(mtcars, iris) stop_dataviewer(id) }if (interactive()) { dataviewer(mtcars) # Opens in RStudio Viewer pane or default web browser dataviewer(iris, mtcars) # Opens multiple datasets in separate tabs dataviewer() # Opens the "Import Dataset" tab (foreground mode - console will be busy) # Run in foreground to enable the "Import Dataset" tab alongside 'mtcars' dataviewer(mtcars, background = FALSE) # Stop background process id <- dataviewer(mtcars, iris) stop_dataviewer(id) }
List Active Background Dataviewer Processes
list_dataviewers()list_dataviewers()
For more information, please refer to the documentation.
Stop All Background Dataviewer Processes
stop_all_dataviewers()stop_all_dataviewers()
For more information, please refer to the documentation.
Stop a Specific or Most Recent Dataviewer Process
stop_dataviewer(id = NULL)stop_dataviewer(id = NULL)
id |
Character string specifying the process ID to stop. If NULL, stops the most recent background dataviewer. |
For more information, please refer to the documentation.