Re: [R] using ls() to find a function

2010-12-18 Thread Henrique Dallazuanna
Try this: ls.str(mode = 'function') On Sat, Dec 18, 2010 at 2:39 PM, Carl Witthoft wrote: > Oddly enough, I posted my little cutie recently: > > > lstype<-function(type='closure'){ > # > >inlist<-ls(.GlobalEnv) >if (type=='function') type <-'closure' >typelist<-sapply(sa

Re: [R] using ls() to find a function

2010-12-17 Thread jim holtman
?ls.str ls.str(mode='function') On Fri, Dec 17, 2010 at 12:12 PM, Erin Hodgess wrote: > Dear R People: > > Is there a way to find which objects are functions via ls(), please? > > I'm sure that there is, but I'm not sure how. > > Thanks, > Erin > > > -- > Erin Hodgess > Associate Professor > Dep

Re: [R] using ls() to find a function

2010-12-17 Thread Duncan Murdoch
On 17/12/2010 12:12 PM, Erin Hodgess wrote: Dear R People: Is there a way to find which objects are functions via ls(), please? I'm sure that there is, but I'm not sure how. Besides the solution you already have, take a look at ?lsf.str. Duncan Murdoch _

Re: [R] using ls() to find a function

2010-12-17 Thread RICHARD M. HEIBERGER
ls()[sapply(ls(), function(x) is.function(get(x)))] On Fri, Dec 17, 2010 at 12:12 PM, Erin Hodgess wrote: > Dear R People: > > Is there a way to find which objects are functions via ls(), please? > > I'm sure that there is, but I'm not sure how. > > Thanks, > Erin > > > -- > Erin Hodgess > Associ