Skip to content
Prev 12095 / 398502 Next

extracting pkg fcn info

An extension to what Natalie asked -- has anyone written an R function
to do something like:

        list.api(function)

which returns arguments, classes, and return statements?

best,
-tony

        
TL> On Mon, 2 Jul 2001, Natalie Hawkins wrote:
>> 
    >> 
    >> I would like to learn what functions are available in a given R
    >> package (say, the pkg sma) and what the arguments and return
    >> value is for each of those functions.
    >> 
    >> Is there an R CMD available for that or a suggested method for
    >> easily extracting that information?

    TL> help(library="package")

    TL> will give a listing of the functions (and perhaps other
    TL> information).

    TL> For a list of all the arguments and return values I would
    TL> suggest the PDF manual pages for that package. These are all
    TL> on CRAN or can be built from the latex help.

    TL> You could get the arguments from library("somepackage")
    TL> sapply(ls(pos=2),function(nm) args(get(nm))) but that wouldn't
    TL> tell you want it meant.

    TL> 	-thomas

    TL> Thomas Lumley Asst. Professor, Biostatistics
    TL> tlumley at u.washington.edu University of Washington, Seattle

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