| 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:
Report bugs at https://github.com/itsmdivakaran/viewR/issues
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 |
edit |
Logical. Enable the Excel-like editing tab.
Default |
popup |
Logical. If |
labels |
Optional named character vector of variable labels.
Names must match column names of |
title |
Window title. Defaults to the name of |
viewer |
Where to display the interface:
|
generate_code |
Logical. Show the R Code tab. Default |
theme |
Bootstrap theme for the 'UI'. One of
|
max_display |
Integer. Maximum rows rendered in the Data View table
(for performance). Default |
return_data |
Logical. When the user clicks Done, return the
(possibly edited) data frame. Default |
... |
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
-
Data View - searchable, paginated DT table with optional variable-label tooltips and column-level search filters.
-
Sidebar Filters - add unlimited filter conditions with operators
==,!=,>,>=,<,<=, contains, starts with, ends with, is NA, is not NA; combine with AND / OR logic. -
Multi-column Sort - add multiple sort levels; choose ascending or descending per column.
-
Column Visibility - show/hide any columns via checkboxes.
-
Excel-like Editor (
edit = TRUE) - powered by rhandsontable; supports in-cell editing, adding rows, and unlimited undo/redo. -
Find & Replace - find literal text or regex across one or all columns with case-sensitivity and exact-match options; preview changes before applying.
-
Variable Info - data type, N, missing min, max, and sample values for every column.
-
R Code Generation - the R Code tab always shows the complete, runnable dplyr pipeline for the current state. One click copies it to the clipboard.
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)
}