Title: An Interactive and Feature-Rich Data Viewer
Version: 1.0.0
Depends: R (≥ 4.2.0)
Description: Provides an interactive viewer for 'data.frame' and 'tibble' 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.
URL: https://github.com/madhankumarnagaraji/dataviewR, https://madhankumarnagaraji.github.io/dataviewR/
BugReports: https://github.com/madhankumarnagaraji/dataviewR/issues
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
Imports: shiny, shinyjs, DT, dplyr, labelled, forcats, stringr, purrr, tibble, datamods, htmlwidgets, callr, rstudioapi
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), shinytest2
VignetteBuilder: knitr
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2026-01-10 14:26:29 UTC; Dell
Author: Madhan Kumar N [aut, cre], Siddhesh Pujari [aut], Gomathi S [aut], Mackenzie Haight [aut]
Maintainer: Madhan Kumar N <madhanmanoj1999@gmail.com>
Repository: CRAN
Date/Publication: 2026-01-10 14:50:07 UTC

Interactive Data Viewer with Filter and Code Generation

Description

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.

Usage

dataviewer(..., background = NULL, port = NULL)

Arguments

...

One or more data.frame or tibble objects. If none provided, an import UI is shown to load data interactively.

background

Logical. If TRUE, runs the app in a background R process using callr. Requires the callr package. Default is TRUE when dataset(s) are provided, FALSE when no dataset(s) are provided.

port

Integer. Port number for the Shiny app. If NULL, a random available port is used. Default is NULL.

Details

This function provides:

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.

Value

If background = TRUE, returns the process ID (character) invisibly. If background = FALSE, returns a Shiny application object.

See Also

For more information about the features of dataviewer, please refer to the documentation.

Examples

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

Description

List Active Background Dataviewer Processes

Usage

list_dataviewers()

See Also

For more information, please refer to the documentation.


Stop All Background Dataviewer Processes

Description

Stop All Background Dataviewer Processes

Usage

stop_all_dataviewers()

See Also

For more information, please refer to the documentation.


Stop a Specific or Most Recent Dataviewer Process

Description

Stop a Specific or Most Recent Dataviewer Process

Usage

stop_dataviewer(id = NULL)

Arguments

id

Character string specifying the process ID to stop. If NULL, stops the most recent background dataviewer.

See Also

For more information, please refer to the documentation.