-
Notifications
You must be signed in to change notification settings - Fork 146
Interactive viewers
With R session watcher enabled, multiple types of viewers are supported to display tabular data, graphics, htmlwidgets and shiny apps.
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 |
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.
The list viewer supports collapsing nodes.
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.
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:
Interactive shiny apps can be displayed in VS Code. The following is an example created by
shiny::runExample("01_hello")
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.
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.
- Getting Started
- Installation
- Configuration
- Features
- Package development
- R Markdown
- Contributing
- FAQ