Skip to content

functions in a package

6 messages · Yan Yu, Marc Schwartz, Jerome Asselin +3 more

#
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:

  
    
#
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>:
#
"Andrew C. Ward" <s195404 at student.uq.edu.au> writes:
...although ls("package:foo") might be preferable if you can't be sure
of the position in the search path.
#
You might be interested in the function lsf.str(), which lists all
functions and their argument lists.  For example,
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: