I am sorry for such a simple question but I just could not find a command to list functions (objects) in a certain library. I had to refer to library documents (often not readily available ) to find them. Many thanks in advance. -- Bo Peng
On Tue, 1 Apr 2003, Ko-Kang Kevin Wang wrote:> Which library is it? If it is a proper R library and has been properly > installed, I think you should be able to do something like: > library(help = ts) # Get the list of functions in ts package > > In fact that will also show some information about the library itself.Alternatively, ls("package:ts") will list all the objects in the package (I presume package and not library was meant: a library is a directory holding installed packages). If you really want to know about the functions (and not all objects) in a package try lsf.str("package:ts") which gives the call sequences too.> > On Mon, 31 Mar 2003, Bo Peng wrote: > > > Date: Mon, 31 Mar 2003 21:34:50 -0600 > > From: Bo Peng <bpeng at stat.rice.edu> > > To: r-help at stat.math.ethz.ch > > Subject: [R] How to list functions in a library? > > > > I am sorry for such a simple question but I just could not find a > > command to list functions (objects) in a certain library. I had to refer > > to library documents (often not readily available ) to find them. > > > > Many thanks in advance. > > > > > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Hi, Which library is it? If it is a proper R library and has been properly installed, I think you should be able to do something like: library(help = ts) # Get the list of functions in ts package In fact that will also show some information about the library itself. On Mon, 31 Mar 2003, Bo Peng wrote:> Date: Mon, 31 Mar 2003 21:34:50 -0600 > From: Bo Peng <bpeng at stat.rice.edu> > To: r-help at stat.math.ethz.ch > Subject: [R] How to list functions in a library? > > I am sorry for such a simple question but I just could not find a > command to list functions (objects) in a certain library. I had to refer > to library documents (often not readily available ) to find them. > > Many thanks in advance. > >-- Cheers, Kevin ------------------------------------------------------------------------------ /* Time is the greatest teacher, unfortunately it kills its students */ -- Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab Demonstrator Department of Statistics University of Auckland New Zealand Homepage: http://www.stat.auckland.ac.nz/~kwan022 Ph: 373-7599 x88475 (City) x88480 (Tamaki)
nm - list symbols from object files (.o .a .so etc.) - maybe that is what you want? nm something.so Bo Peng wrote:> I am sorry for such a simple question but I just could not find a > command to list functions (objects) in a certain library. I had to refer > to library documents (often not readily available ) to find them. > > Many thanks in advance. >-- Pingping Zheng Department of Mathematics and Statistics Fylde College Lancaster University Lancaster LA1 4YF UK
Thank you all for your apply. Both commands works. For example, library(help=MASS) will list function names with description and ls(package:MASS) will list all object names. -- Bo Peng
Benjamin.STABLER@odot.state.or.us
2003-Apr-01 17:37 UTC
[R] How to list functions in a library?
> library(e1071) > search()[1] ".GlobalEnv" "package:e1071" "Autoloads" "package:base"> ls(pos=2)[1] "allShortestPaths" "bclust" "best.nnet" [4] "best.randomForest" "best.rpart" "best.svm" [7] "bincombinations" "bootstrap.lca" "boxplot.bclust" [10] "centers.bclust" "classAgreement" "clusters.bclust" [13] "cmeans" "compareMatchedClasses" "countpattern" [16] "cshell" "d2sigmoid" "ddiscrete" [19] "dsigmoid" "element" "extractPath" [22] "fclustIndex" "hamming.distance" "hamming.window" [25] "hanning.window" "hclust.bclust" "ica" [28] "impute" "interpolate" "knn.wrapper" [31] "kurtosis" "lca" "matchClasses" [34] "moment" "na.fail.matrix.csr" "pdiscrete" [37] "permutations" "plot.bclust" "plot.ica" [40] "plot.stft" "plot.svm" "plot.tune" [43] "predict.lca" "predict.svm" "print.bootstrap.lca" [46] "print.fclust" "print.ica" "print.lca" [49] "print.summary.lca" "print.summary.svm" "print.summary.tune" [52] "print.svm" "print.tune" "prune.bclust" [55] "qdiscrete" "rbridge" "rdiscrete" [58] "read.matrix.csr" "read.octave" "rectangle.window" [61] "rpart.wrapper" "rwiener" "scaclust" [64] "scale.data.frame" "sigmoid" "skewness" [67] "stft" "summary.lca" "summary.svm" [70] "summary.tune" "svm" "svm.default" [73] "svm.formula" "tune" "tune.knn" [76] "tune.nnet" "tune.randomForest" "tune.rpart" [79] "tune.svm" "write.matrix.csr" Benjamin Stabler Transportation Planning Analysis Unit Oregon Department of Transportation 555 13th Street NE, Suite 2 Salem, OR 97301 Ph: 503-986-4104 Bo Peng wrote:> I am sorry for such a simple question but I just could not find a > command to list functions (objects) in a certain library. I had to refer > to library documents (often not readily available ) to find them. > > Many thanks in advance. >