persist: Make a variable persistent

Description Usage Arguments Details Examples

Description

Make a variable persistent and remove it from interactive scope. The persistent variables will not be cleaned by the rm(list = ls()).

Usage

1
persist(a_var)

Arguments

a_var

The variable to make persisence

Details

The persisted variables are session-specific. They will be gone after you restart R

Note that if you define a new variable with the same name as the persisted variable, the new variable will mask the persisted one until it is removed.

Examples

1
2
3
x <- "hello"
persist(x)
# x is now not in the .GlobalEnv but still accessible

chatchavan/cleanslate documentation built on May 20, 2019, 8:01 p.m.