Adds a custom editor theme to RStudio and returns the name of the newly added theme.

addTheme(themePath, apply = FALSE, force = FALSE, globally = FALSE)

Arguments

themePath

A full or relative path or URL to an rstheme or tmtheme to be added.

apply

Whether to immediately apply the newly added theme. Setting this to TRUE has the same impact as running { rstudioapi::addTheme(<themePath>); rstudioapi::applyTheme(<themeName>) }.
Default: FALSE.

force

Whether to force the operation and overwrite an existing file with the same name.
Default: FALSE.

globally

Whether to install this theme for the current user or all users. If set to TRUE this will attempt to install the theme for all users, which may require administrator privileges.
Default: FALSE.

Note

The addTheme function was introduced in RStudio 1.2.879.