Learn R Programming

startup (version 0.9.0)

install: Install and uninstall support for .Renviron.d and .Rprofile.d startup directories

Description

Install and uninstall support for .Renviron.d and .Rprofile.d startup directories by appending / removing one line of code to the ~/.Rprofile file.

Usage

install(path = "~", backup = TRUE, overwrite = FALSE, quiet = FALSE)

uninstall(path = "~", backup = TRUE, quiet = FALSE)

Arguments

path

The path where to create / update the .Rprofile file.

backup

If TRUE, a timestamped backup copy of the original file is created before modifying / overwriting it, otherwise not. If the backup fails, then an error is produced and the R startup file is unmodified.

overwrite

If the R startup file already exist, then FALSE (default) appends the startup code to the end of the file. is overwritten. If TRUE, any pre-existing R startup file is overwritten.

quiet

If FALSE (default), detailed messages are generated, otherwise not.

Value

The pathname of the R startup file modified.

Functions

  • install: injects a try(startup::startup()) call to the .Rprofile.

  • uninstall: Remove calls to startup::startup() and similar.