readRStudioPreference | R Documentation |
Reads an internal RStudio IDE preference for the current user.
readRStudioPreference(name, default)
name |
The name of the preference. |
default |
The default value of the preference, returned if the preference is not found. |
RStudio IDE internal preferences include the values displayed in RStudio's Global Options dialog as well as a number of additional settings.
The readRStudioPreference
function was added in version 1.3.387
of RStudio.
readPreference
, which can be used to read arbitrary
user (non-RStudio) preferences set with writePreference
.
link{writeRStudioPreference}
, which can be used to write internal
RStudio IDE preferences.
## Not run:
# Get indentation settings
spaces <- rstudioapi::readRStudioPreference("num_spaces_for_tab", FALSE)
message("Using ", spaces, " per tab.")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.