RE: [R] names of functions in a library

From: Liaw, Andy <andy_liaw_at_merck.com>
Date: Tue 07 Jun 2005 - 09:24:41 EST


> From: Duncan Murdoch
>
> On 6/6/2005 4:43 PM, Omar Lakkis wrote:
> > How can I get a list of the names of all exported functions
> in a library?
> > I load my library using library() and then want to
> dynamically get all
> > functions that start with "test." to dynamically execute them.
>
> Use search() to see all the _packages_ that have been loaded.
> If yours
> is second in the list (the typical spot just after calling the
> unfortunately named library() function), then ls(2) will list
> all of its
> exports.

Just to nitpick a bit: That lists all _objects_ in position 2, which may include objects that are not functions, although it's rare, if at all, that a package database would contain non-functions...

Andy  

> Duncan Murdoch
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jun 07 09:33:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:25 EST