clear: Remove variables, dataset or functions from memory

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/basetools.R

Description

Clear can be used to remove objects from memory (variables, data.frame, functions). Clear is easier than rm and is more secure because, by default, it ask for confirmation. Objects to remove can be specified as is or by their name ("character"). It's possible to erase all vars, all functions using keywords : "vars" or "functions" "all" keyword will allows total cleaning.

Usage

1
clear(what, noask = FALSE)

Arguments

what

Keyword (vars, functions, all) or pattern

noask

to clear whithout confirmation. Useful when running from a script

Details

When keyword or pattern are used and there is more than one object to clear, a confirmation will be issued. Except if noask parameters is set to true If there only one object matching the exactly the what parameter, this object is removed whithout confirmation

Author(s)

Gilles Desve

References

Based on: Epi6 and Stata functionnality, available at https://github.com/.

See Also

rm

Examples

1
2
3
tmp <- 5
temp <- 5
clear(t)

gdesve/epifield documentation built on Jan. 23, 2022, 10:03 a.m.