Package {ViewR}


Type: Package
Title: Interactive Data Viewer, Filter, and Editor
Version: 1.0.0
Description: Provides a feature-rich, popup-based interactive interface for viewing, exploring, filtering, sorting, editing, analysing, and plotting R data frames. Key features include: a searchable, paginated data table with drag-and-drop column reordering and variable-label 'tooltips'; multi-condition filters (AND/OR) with live preview; multi-column sorting; column visibility management with search; an Excel-like cell editor powered by 'rhandsontable'; find-and-replace across one or all columns (literal or regex) with automatic live preview; a Plots tab with auto-detected histograms and bar charts for every column; automatic 'dplyr' code generation reflecting every operation performed in the 'UI'; one-click CSV export; and a Variable Info tab with type, missing values, and summary statistics. The entire interface is launched with a single call to ViewR() and works as a popup dialog, in the 'RStudio' Viewer pane, or in the system browser.
License: MIT + file LICENSE
Encoding: UTF-8
Language: en-GB
Depends: R (≥ 4.1.0)
URL: https://github.com/itsmdivakaran/viewR, https://itsmdivakaran.github.io/viewR/
BugReports: https://github.com/itsmdivakaran/viewR/issues
RoxygenNote: 7.3.3
Imports: shiny (≥ 1.7.0), DT (≥ 0.27), rhandsontable (≥ 0.3.8), shinyjs (≥ 2.1.0), shinythemes (≥ 1.2.0), htmltools (≥ 0.5.4), jsonlite (≥ 1.8.0), utils
Suggests: haven, tibble, dplyr, knitr, rmarkdown, testthat (≥ 3.0.0), covr
VignetteBuilder: knitr
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2026-05-04 06:12:06 UTC; maheshdivakaran
Author: Mahesh Divakaran [aut, cre]
Maintainer: Mahesh Divakaran <imaheshdivakaran@gmail.com>
Repository: CRAN
Date/Publication: 2026-05-06 19:50:07 UTC

ViewR: Interactive Data Viewer, Filter, and Editor

Description

Provides a feature-rich, popup-based interactive interface for viewing, exploring, filtering, sorting, editing, analysing, and plotting R data frames. Key features include: a searchable, paginated data table with drag-and-drop column reordering and variable-label 'tooltips'; multi-condition filters (AND/OR) with live preview; multi-column sorting; column visibility management with search; an Excel-like cell editor powered by 'rhandsontable'; find-and-replace across one or all columns (literal or regex) with automatic live preview; a Plots tab with auto-detected histograms and bar charts for every column; automatic 'dplyr' code generation reflecting every operation performed in the 'UI'; one-click CSV export; and a Variable Info tab with type, missing values, and summary statistics. The entire interface is launched with a single call to ViewR() and works as a popup dialog, in the 'RStudio' Viewer pane, or in the system browser.

Author(s)

Maintainer: Mahesh Divakaran imaheshdivakaran@gmail.com

See Also

Useful links:


ViewR: Interactive Data Viewer, Filter, and Editor

Description

Opens a feature-rich, popup-based Shiny interface for viewing, exploring, filtering, sorting, editing, and analysing R data frames. All operations are reflected in real-time as copy-pasteable dplyr code.

Usage

ViewR(
  data,
  edit = FALSE,
  popup = TRUE,
  labels = NULL,
  title = NULL,
  viewer = c("dialog", "browser", "pane"),
  generate_code = TRUE,
  theme = c("flatly", "cerulean", "cosmo", "darkly", "lumen", "paper", "readable",
    "sandstone", "simplex", "spacelab", "united", "yeti"),
  max_display = 50000L,
  return_data = TRUE,
  ...
)

Arguments

data

A data.frame or tibble to view / edit.

edit

Logical. Enable the Excel-like editing tab. Default FALSE.

popup

Logical. If TRUE (default), open in a popup dialog; if FALSE, open in the system browser.

labels

Optional named character vector of variable labels. Names must match column names of data. If NULL, labels are read from column attributes (e.g.\ as set by haven).

title

Window title. Defaults to the name of data.

viewer

Where to display the interface:

"dialog"

Popup dialog (default when popup = TRUE).

"browser"

System web browser.

"pane"

RStudio Viewer pane.

generate_code

Logical. Show the R Code tab. Default TRUE.

theme

Bootstrap theme for the 'UI'. One of "flatly" (default), "cerulean", "cosmo", "darkly", "lumen", "paper", "readable", "sandstone", "simplex", "spacelab", "united", "yeti".

max_display

Integer. Maximum rows rendered in the Data View table (for performance). Default 50000.

return_data

Logical. When the user clicks Done, return the (possibly edited) data frame. Default TRUE.

...

Reserved for future arguments; currently ignored.

Value

If return_data = TRUE and the user clicked Done, returns the modified data frame invisibly. Otherwise returns the original data frame invisibly.

Features

Examples

if (interactive()) {
  ViewR(mtcars)

  new_iris <- ViewR(iris, edit = TRUE)

  ViewR(mtcars,
        labels = c(mpg = "Miles per Gallon",
                   cyl = "Number of Cylinders",
                   hp  = "Gross Horsepower"),
        theme  = "darkly")

  ViewR(iris, viewer = "browser", generate_code = TRUE)
}