Skip to main content

builtin_lib_paths

Function builtin_lib_paths 

Source
fn builtin_lib_paths(
    _args: &[RValue],
    _named: &[(String, RValue)],
    context: &BuiltinContext<'_>,
) -> Result<RValue, RError>
Expand description

Return the library search paths for package installation.

Builds the search path from (in order):

  1. R_LIBS environment variable (colon-separated on Unix, semicolon on Windows)
  2. R_LIBS_USER environment variable
  3. The default miniR library directory (<data_dir>/miniR/library)

Only directories that actually exist on disk are included, matching R’s behavior of filtering .libPaths() to existing directories.

@param new character vector: if provided, sets new library paths (currently ignored) @return character vector of library search paths