Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Disclaimer: This blog contains opinions that are of the authors alone and do not necessarily reflect the strategy of their respective organizations.
< section id="the-humble-view-and-its-limits" class="level2">The humble View() and its limits
View() has served R programmers well for a long time — pass it a data frame, get a spreadsheet-style window. It even has a basic search bar for checking whether a value exists in your data. But the moment you need something more precise — filter by a specific column or combine conditions — you are back in your script.
Add to that: no side-by-side dataset comparison, no metadata inspection, and no way to carry your exploration into reproducible code. For day-to-day clinical data work — reviewing your clinical datasets, let’s say ADSL, cross-checking subject demographics against lab data in ADLB, doing a QC pass before analysis — these gaps add up.
What is dataviewR?
dataviewR is a Shiny-based interactive data viewer that works alongside View() as a companion — not a replacement. It launches directly in your RStudio Viewer pane, requires no Shiny code, and never modifies the datasets passed to it.
install.packages("dataviewR")
< section id="features" class="level2">
Features
dataviewR offers the following capabilities:
- Interactive Filtering — apply
dplyr-style expressions directly in the app, no script changes needed. Supports%in%,is.na(),grepl(), and compound conditions — the same syntax you already write every day.
SEX == "F" & AGE > 65 & TRT01P == "Xanomeline High Dose"
- Reproducible Code Generation — hit “Generate R Code” and walk away with ready-to-use
dplyrcode from your interactions. Your exploration session feeds directly into your scripted workflow.
- Variable Metadata — inspect variable classes, labels and attributes without writing
str()orattr()calls. Particularly useful for clinical datasets where CDISC-style labels are carried as R attributes.
See all of this in action:
< video width="450" controls="" playbackrate="2" onloadedmetadata="this.playbackRate = 2;"> < source src="dataview_explore.mp4" type="video/mp4"> < section id="cross-checking-multiple-datasets" class="level2">Cross-Checking Multiple Datasets
But what if you need to look at more than one dataset at the same time? dataviewR handles that too — pass multiple datasets in a single call and each opens in its own tab within the same session. Switch between them, filter independently, and track a specific subject across datasets — the kind of check that comes up in every safety review.
library(dataviewR) library(pharmaverseadam) dataviewer(adsl, adlb)< video width="450" controls="" onloadedmetadata="this.playbackRate = 1.5;"> < source src="dataview_multidata.mp4" type="video/mp4"> < section id="final-thoughts" class="level2">
Final Thoughts
That is dataviewR in a nutshell. Try it out and share your thoughts on GitHub or pharmaverse Slack!
Full documentation, vignettes, and clinical dataset examples are available at madhankumarnagaraji.github.io/dataviewR.
< !--------------- appendices go here ----------------->Last updated
2026-03-31 18:28:15.461796
Details
< section class="quarto-appendix-contents" id="quarto-reuse">Reuse
< section class="quarto-appendix-contents" id="quarto-citation">Citation
@online{pujari2026,
author = {Pujari, Siddhesh and Kumar N, Madhan and S, Gomathi and
Haight, Mackenzie},
title = {Meet {dataviewR:} {The} {View()} {You} {Always} {Wanted}},
date = {2026-03-31},
url = {https://pharmaverse.github.io/blog/posts/2026-03-29-meet-dataviewr-the/meet-dataviewr-the-view-you-always-wanted.html},
langid = {en}
}
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
