1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prefs.R
\name{readRStudioPreference}
\alias{readRStudioPreference}
\title{Read RStudio Preference}
\usage{
readRStudioPreference(name, default)
}
\arguments{
\item{name}{The name of the preference.}
\item{default}{The default value of the preference, returned if the
preference is not found.}
}
\description{
Reads an internal RStudio IDE preference for the current user.
}
\details{
RStudio IDE internal preferences include the values displayed in RStudio's
Global Options dialog as well as a number of additional settings.
}
\note{
The \code{readRStudioPreference} function was added in version 1.3.387
of RStudio.
}
\examples{
\dontrun{
# Get indentation settings
spaces <- rstudioapi::readRStudioPreference("num_spaces_for_tab", FALSE)
message("Using ", spaces, " per tab.")
}
}
\seealso{
\code{\link{readPreference}}, which can be used to read arbitrary
user (non-RStudio) preferences set with \code{\link{writePreference}}.
\code{link{writeRStudioPreference}}, which can be used to write internal
RStudio IDE preferences.
}
|