Best? Probably not. No money back if this deletes everything by mistake:

remove(list=ls()[sapply(ls(),function(n){!is.function(get(n))})])

As a function, maybe:

clearNonF=function(e=.GlobalEnv){remove(list=ls(e)[sapply(ls(e),function(n){!is.function(get(n))})],envir=e)}

clearNonF() will clear out the current workspace. Maybe.

On Tue, Feb 7, 2012 at 4:13 PM, Keith Weintraub <kw1...@gmail.com> wrote:
> I think the subject says it all.

Barry

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to