set_library: Set the User Library Path

View source: R/set_library.R

set_libraryR Documentation

Set the User Library Path

Description

Set the path for where R will install packages.

Usage

set_library(lib_path = "/dbfs/Rlib", Rversion = T)

remove_library(lib_path)

Arguments

Rversion

boolean. Should the current version of R be added as a directory in the path? Defaults to TRUE.

user_libpath

A string representing the path to install packages in DBFS

user_lib_path

A string representing the path to be removed from .libPaths()

Details

To persist packages on Databricks use a path that begins with '/dbfs/'. This is designed to be used in conjunction with 'bricksteR::curate()'. For shared clusters where users prefer package isolation, each user should create their own path for package installation. If building a central shared repo of packages, set the path to a common directory.

Value

The user library path

The removed library path

Examples


path <- "/dbfs/rk/my_packages"

set_library(lib_path = path)

remove_library(path)

RafiKurlansik/bricksteR documentation built on Oct. 13, 2022, 6:58 a.m.