term_user_lib: Set R User Library

Description Usage Arguments Author(s) Examples

View source: R/term_user_lib.R

Description

Sets R user library using .libPaths and R_LIBS_USER in .Renviron.

Usage

1
term_user_lib(libpath = NULL, dir = Sys.getenv("HOME"), overwrite = TRUE)

Arguments

libpath

Character string. User library path. If unspecified, defaults to {HOME}/R/{PLATFORM}/{R.VERSION} (${HOME}/R/%p/%v).

dir

Character string. .Renviron directory. Defaults to user's home directory.

overwrite

Logical. If .Renviron exists in dir, the variable R_LIBS_USER is overwritten with R_LIBS_USER="{libpath}". This argument is set to TRUE to ensure that the specified libpath is reflected in the .Renviron in dir.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

1
2
3
4
5
6
7
## Not run: 
term_user_lib(
  libpath = file.path(getwd(), "lib"),
  dir = getwd()
)

## End(Not run)

jeksterslabds/jeksterslabRterm documentation built on July 13, 2020, 11:43 p.m.