okeep: keep variables funcion

View source: R/okeep.r

okeepR Documentation

keep variables funcion

Description

Esta funcion borra o conserva objetos del gloval environment se puede conservar objetos puntuales por nombre y por clase el resto se borra del entorno.

Usage

okeep(keep = NULL, dframe = FALSE, fun = FALSE, char = FALSE, num = FALSE)

Arguments

keep

Character vector with the name of the objects to keep

dframe

Logical, set TRUE for keep all "data frames" in the environment

fun

Logical, set TRUE for keep all "functions" in the environment

char

Logical, set TRUE for keep all "character objects" in the environment

num

Logical, set TRUE for keep all "numeric objects" in the environment

Value

Just drop any object not included in the parameters

Examples

# Create some objects and keep one and data frames
# cars <- mtcars
# a <- 1
# b <- 2
# c <- "qwerty"
# d <- data.frame(d = 123)
# e <- "asdfg"
# f <- TRUE
# okeep(keep = c("a", "f"), dframe = TRUE)


olitroski/olibrary documentation built on Oct. 20, 2022, 2:42 p.m.