R/rm_dt.R

Defines functions rm_dt

Documented in rm_dt

#' A remove data function
#'
#' This function allows you to remove all objects in the environment except functions
#' @param
#' @keywords remove data
#' @export

rm_dt <- function(){
    lst <- ls(envir = parent.frame())
    lst=lst[sapply(lst, function(x) {max(class(get(x)) %notin% c("function")) == 1})]
    rm(list=lst, envir = parent.frame())
}
ghowoo/Wu documentation built on June 10, 2022, 3:47 p.m.