clearEnv: Clear (global) environment and free up memory

Description Usage Arguments Value Examples

View source: R/clearEnv.R

Description

Removes all objects in the global environment including hidden objects, and afterwards runs the garbage collector to free up memory.

Usage

1
clearEnv(envir = .GlobalEnv, hidden = TRUE)

Arguments

envir

(optional) The environment to clear. default: .GlobalEnv

hidden

(optional) Include hidden objects (those starting with a dot "."). default: TRUE

Value

Prints the removed objects, their classes, and the output from garbage collector.

Examples

1
2
assign("test", "test", envir = .GlobalEnv)
clearEnv()

KasperSkytte/ksatools documentation built on April 7, 2021, 4:26 p.m.