Skip to contents

Returns currently set preferences to RStudio's original, built-in default.

Usage

prefs_reset_defaults(source = c("project", "user"), verbose = FALSE, ...)

Arguments

source

The source of the current preference value. Preferences are set at different levels, from lowest to highest precedence:

  • "default" are RStudio's built-in defaults

  • "computed" are detected or supplied from external sources, e.g. the path to git on your system

  • "system" are derived from system-wide rstudio-prefs.json

  • "user" are set by the user for all sessions (global options)

  • "project" are set by the current project session

The default is "user", since these are the settings you set yourself for all projects. You can include any number of sources, or "all" to include all preferences regardless of source.

verbose

Prints or suppress informative output

...

Arguments passed on to snapshot_prefs_save

include

Names of RStudio preferences to include. If provided, only these preferences are included. See prefs_rstudio for preference names.

exclude

Names of RStudio preferences to exclude from the snapshot. See prefs_rstudio for all of the preference names.

exclude_os_prefs

Excludes operating-system or machine-dependent system preferences from the snapshot or the snapshot restore.

Value

Resets preferences to their built-in defaults, returning the current preferences invisibly as a list. You can also return to the preferences prior to prefs_reset_defaults() with snapshot_prefs_undo().

Examples

if (FALSE) { # \dontrun{
prefs_reset_defaults()
} # }