[R] functions in a package

Jeff Breiwick Jeff.Breiwick at noaa.gov
Mon Apr 14 21:31:43 CEST 2003


Below is a function that lists all packages (called without an argument) or
the functions in a package (called with the package name - quotes not
needed).

"libs"<-
function (Lib) 
{
    if (missing(Lib)) 
        print(.packages(all = TRUE), q = F)
    else eval(parse(text = paste("library(help=",
as.character(substitute(Lib)),")")))
}

-------------------------------------------
Jeffrey M Breiwick, Ph.D.
National Marine Mammal Lab., AFSC, NOAA
7600 Sand Point Way NE, Bldg. 4
Seattle, Washington 98115    USA

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help



More information about the R-help mailing list