Skip to content

Interactive viewers

eitsupi edited this page Sep 27, 2026 · 10 revisions

With R session watcher enabled, multiple types of viewers are supported to display tabular data, graphics, htmlwidgets and shiny apps.

Data viewer

View() will open a tab to view the object.

Object type Viewer
data.frame or matrix paged table viewer
Apache Arrow table paged table viewer
Polars DataFrame paged table viewer
list JSON viewer
others, including environments R code viewer

Table viewer

Rows are loaded on demand as you scroll. The table viewer supports sorting, column filters, row counts, full-value tooltips, and a column panel for searching, showing, hiding, pinning, and reordering columns. Calling View() on the same object again refreshes the existing tab and preserves its layout when the column names, order, and types are unchanged.

image

List viewer

The list viewer supports collapsing nodes.

image

Plot viewer

The plot viewer supports JGD, httpgd, and a responsive standard SVG/PNG backend. For more details, go to https://github.com/REditorSupport/vscode-R/wiki/Plot-viewer.

plot-viewer

Webpage viewer

In R, an htmlwidget is written in HTML and can be presented in a web browser. For example, the following image demonstrates an interactive graphics created by plotly:

webpage-viewer

Browser viewer

Interactive shiny apps can be displayed in VS Code. The following is an example created by

shiny::runExample("01_hello")
browser-viewer

For security reasons, the VS Code WebView has security limitations on its capability of accessing external resources over a network. For more details, visit WebView API.

If you encounter a problem loading a webpage in a browser viewer, you may try viewing the web page in an external web browser.

Help viewer

The web pages in R documentation can be viewed in the help viewer. Syntax highlighting and link navigation are supported.

Help viewer could be revealed via ?symbol in R terminal, or from the Help pages viewer in the sidebar, or via command R: Open help for selection in either command palette or context menu in the editor.

help-viewer

Clone this wiki locally