See 'mode' argument in ls.str function.

On Sun, Nov 7, 2010 at 2:40 PM, Carl Witthoft <c...@witthoft.com> wrote:

> Hi all,
> Just thought I'd post this (maybe) helpful tool I wrote.  For people like
> me who are bad at keeping a clean environment, it's a time-saver.
>
> #simple command to get only one type of object in current environment
> lstype<-function(type='closure'){
>        inlist<-ls(.GlobalEnv)
>        if (type=='function') type <-'closure'
>        typelist<-sapply(sapply(inlist,get),typeof)
>        return(names(typelist[typelist==type]))
> }
>
>
>
> Carl
>
> ______________________________________________
> 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
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