Hello, I have a beginner's Q: if i want to know all the functions provided by a package, what is command for that? in another word, Is there a command to list all the commands available in a packege? thanks a lot, yan
functions in a package
6 messages · Yan Yu, Marc Schwartz, Jerome Asselin +3 more
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Yan Yu Sent: Sunday, April 13, 2003 8:52 PM To: r-help at stat.math.ethz.ch Subject: [R] functions in a package Hello, I have a beginner's Q: if i want to know all the functions provided by a package, what is command for that? in another word, Is there a command to list all the commands available in a packege? thanks a lot, yan
Look at ?package.contents
For example:
package.contents("ctest")
HTH,
Marc Schwartz
E.g.: for package MASS, use: library(help="MASS") Jerome
On April 13, 2003 06:52 pm, Yan Yu wrote:
Content-Length: 361 Status: R X-Status: N Hello, I have a beginner's Q: if i want to know all the functions provided by a package, what is command for that? in another word, Is there a command to list all the commands available in a packege? thanks a lot, yan
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Jerome Asselin (J?r?me), Statistical Analyst British Columbia Centre for Excellence in HIV/AIDS St. Paul's Hospital, 608 - 1081 Burrard Street Vancouver, British Columbia, CANADA V6Z 1Y6 Email: jerome at hivnet.ubc.ca Phone: 604 806-9112 Fax: 604 806-9044
Yan, I believe this very question was asked on this list in the past couple of weeks. One of the solutions was > search() # gives a list of loaded packages > ls(pos=2) # lists all functions in pos=2 of the search path Regards, Andrew C. Ward CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia andreww at cheque.uq.edu.au Quoting Yan Yu <yanyu at cs.ucla.edu>:
Hello, I have a beginner's Q: if i want to know all the functions provided by a package, what is command for that? in another word, Is there a command to list all the commands available in a packege? thanks a lot, yan
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
"Andrew C. Ward" <s195404 at student.uq.edu.au> writes:
Yan, I believe this very question was asked on this list in the past couple of weeks. One of the solutions was
> search() # gives a list of loaded packages > ls(pos=2) # lists all functions in pos=2 of the search path
...although ls("package:foo") might be preferable if you can't be sure
of the position in the search path.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
You might be interested in the function lsf.str(), which lists all functions and their argument lists. For example,
library(foreign)
lsf.str("package:foreign")
data.restore : function (file, print = FALSE, verbose = FALSE, env =
.GlobalEnv)
lookup.xport : function (file)
read.S : function (file)
read.dta : function (file, convert.dates = TRUE, tz = "GMT",
convert.factors = TRUE)
read.epiinfo : function (file, read.deleted = FALSE, guess.broken.dates =
FALSE,
thisyear = NULL, lower.case.names = FALSE)
read.mtp : function (file)
read.spss : function (file, use.value.labels = TRUE, to.data.frame =
FALSE,
max.value.labels = Inf)
read.ssd : function (libname, sectionnames, tmpXport = tempfile(),
tmpProgLoc = tempfile(),
sascmd = "sas")
read.xport : function (file)
write.dta : function (dataframe, file, version = 6, convert.dates = TRUE,
tz = "GMT", convert.factors = c("labels", "string", "numeric",
"codes"))
-roger _______________________________ UCLA Department of Statistics http://www.stat.ucla.edu/~rpeng
On Sun, 13 Apr 2003, Yan Yu wrote:
Hello, I have a beginner's Q: if i want to know all the functions provided by a package, what is command for that? in another word, Is there a command to list all the commands available in a packege? thanks a lot, yan
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help