packageSum {sos} | R Documentation |
Obtain a summary by package of a findFn
object give it class packageSum
.
This is a simple function, first calling
PackageSum2
, than assigning
class packagesum
to it.
packageSum(x, fields=c("Title", "Version", "Author", "Maintainer", "Packaged", 'helpPages', 'vignette', 'URL'), lib.loc=NULL, ...) ## S3 method for class 'findFn' packageSum(x, fields=c("Title", "Version", "Author", "Maintainer", "Packaged", 'helpPages', 'vignette', 'URL'), lib.loc=NULL, ...) ## S3 method for class 'data.frame' packageSum(x, fields=c("Title", "Version", "Author", "Maintainer", "Packaged", 'helpPages', 'vignette', 'URL'), lib.loc=NULL, ...) ## S3 method for class 'list' packageSum(x, fields=c("Title", "Version", "Author", "Maintainer", "Packaged", 'helpPages', 'vignette', 'URL'), lib.loc=NULL, ...)
x |
a data.frame with columns |
fields |
character vector of names of columns to add to Component 'Packaged' receives special treatment. If
present, only the portion preceding ';' will be retained.
This seems to be a time stamp automatically generated by
something like |
lib.loc |
an optional |
... |
additional arguments (currently unused) |
With an object of class findFn
, call
PackageSum2
, then make it class
packageSum
.
If less than half of the package reference are
installed, it prints a note suggesting the
user call installPackages
, because
much of the information is obtained from
the packages' DESCRIPTION
file.
a data.frame
of class
c('packageSum', 'data.frame').
Spencer Graves
findFn
PackageSum2
PackageSummary
installPackages
## ## data.frame method ## tstdf <- data.frame(Package=c('grid', 'base'), stringsAsFactors=FALSE) tst2 <- packageSum(tstdf) ## ## list method ## tstList <- list(PackageSummary=tstdf) all.equal(tst2, packageSum(tstList)) ## ## findFn method ## tst.findFn <- data.frame( Package=c('grid', 'base')[c(1,1,2)], Score=2:4, Date=LETTERS[1:3], stringsAsFactors=FALSE) attr(tst.findFn, 'PackageSummary') <- PackageSummary(tst.findFn) class(tst.findFn) <- c('findFn', 'data.frame') tst2. <- packageSum(tst.findFn) all.equal(tst2, tst2.[names(tst2)]) ## ## spline example ## splineHelp <- findFn("spline", maxPages = 2) splinePkgs <- packageSum(splineHelp)