Message-ID: <000001c302bc$7b1e8210$84b037a1@nmml1012breiwxp>
Date: 2003-04-14T19:31:43Z
From: Jeff Breiwick
Subject: functions in a package
In-Reply-To: <200304141108.h3EB8HAR017453@hypatia.math.ethz.ch>
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