[R] list function objects only

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Mar 14 21:07:41 CET 2002


On Thu, 14 Mar 2002, Bob Porter wrote:

> I use R and SPlus intensely, yet sporadically, and always seem to forget
> something essential....even if I keep logs.  Anyway, I thought I used to use
> a command in R to list or identify only those objects that were
> functions.....eg to create a list for filing.  Am I hallucinating?  I can't
> seem to find the function I want in SEARCH.

Not directly, but easy to do by a bit of programming.

ls.functions <- function()
{
   x <- eval.parent(quote(ls()))
   x[sapply(x, function(x) typeof(get(x)) == "closure")]
}


> In a related way, is there an R package that provides object management
> utilities similar to the Object Browser in SPLUS?

Would that be the Object *Explorer* in the Windows versions 2000 and 6?
If so, no.  (Object Browsers went away some years ago.)

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list