R Tools for Visual Studio options
Settings are accessed through the R Tools > Options menu, or through Tools > Options and scrolling to R Tools:
Options and settings specific to R are accessed using the methods below. You must select the Show all settings box at the bottom of the Options dialog box for all of these sections to appear.
- Code formatting options (see Editor options: Tools > Options menu, then select Text Editor > R > Formatting
- Linter options (see Linting): Tools > Options menu, then select Text Editor > R > Lint
- Advanced editor options (described in this article): Tools > Options menu, then select Text Editor > R > Advanced
- Behavioral options (described in this article): R Tools > Options menu, or Tools > Options, then scroll to R Tools.
The R Tools > Data Science Settings command affects also a number of different settings in Visual Studio overall. This command is described in the next section.
R Tools > Data Science Settings
The R Tools > Data Science Settings menu item configures the Visual Studio IDE with a layout that's optimized for the needs of data scientists. Specifically, this option opens the Interactive, Variable Explorer, and Workspaces windows:
To revert to other Visual Studio settings later on, first use the Tools > Import and Export Settings command, select Export selected environment settings, and specify a file name. To restore those settings, use the same command and select Import selected environment settings. You can also use the same commands if you change the data scientist layout and want to return to it later on, rather than using the Data Science Settings command directly.
Text Editor > R > Advanced options
These options control the behavior of formatting, IntelliSense, outlining, indenting, and syntax checking for R.
Each option is set to either on or off to control the behavior in question. For details on what each option affects, look at the help pane at the bottom of the dialog box. Note that you can drag the top of that help pane up to make the pane larger.
R Tools > Advanced options
The R Tools > Options menu command opens the Options dialog to the R options:
The following sections describe the different options available on this page.
|Evaluate active bindings||
|Show dot-prefixed variables||
||Specifies whether variables prefixed with
||By default, the
|F1 Web browser||
||Controls how help is displayed when you are searching for a term using Ctrl+F1. When set to
|F1 Web Search String||
||Controls how search terms are passed to your search engine when you press Ctrl+F1 on a term in the editor. By default the string is
|R Help Browser||
||Controls how help is displayed when you are searching the R documentation using F1, ?, or ??. When set to
|Always save history||
||Controls whether RTVS writes your command history to a .RHistory file in your working directory whenever the project is closed. Saving the history happens even if you don't save your project before you exit.|
|Reset search filter||
||Determines whether the History window can filter your command history to show only the commands that substring match against the filter term in the R History dialog. This setting determines whether to reset your History search filter whenever you run a new command or switch to a new project, which triggers the load of a different .RHistory file. The default setting of
|Use multiline selection||
||Specifies whether you can select a multi-line statement in History with a single click. Also enables up/down arrow navigation in the Interactive Windows by statements rather than lines.|
|HTML Pages browser||
||Determines where content such as a
||Controls the verbosity of the logging used for RTVS diagnostics. The default setting of
|Markdown preview browser||
||Determines where RMarkdown HTML output is displayed.
||Sets the code page (locale) for R. By default it uses the underlying locale of the operating system.|
||Sets the default CRAN mirror for package installations. The default setting of
|Load workspace when project opens||
|Prompt to save workspace on reset||
|Save workspace when project closes||
|Show confirmation dialog before switching workspaces||
|Show machine load indicator||
||Controls visibility of the CPU/Memory/Network load indicator in the status bar. Because the indicator incurs network traffic, it's helpful to keep this
Send feedback about: