pkg_age: Determine the Age of An Installed Package

Description Usage Arguments Value Examples

Description

Determine the age of a particular installed package. The age is simply the time difference (using difftime) between today's date and the package's very first appearance on CRAN.

Usage

1
2
pkg_age(package, units = c("auto", "secs", "mins", "hours", "days", "weeks"),
  ...)

Arguments

package

Character string specifying the name of the package.

units

character string specifying the units (e.g., "days"). Can be abbreviated.

...

Additional optional arguments to be passed on to pkg_bday.

Value

A "difftime" object representing the age of the package. Can be coerced to a double using as.double.

Examples

1
2
3
4
5
## Not run: 
pkg_age("rpart")
cat("rpart is", as.double(pkg.age("rpart")) / 365, "years old today!\n")

## End(Not run)

bgreenwell/pkgbday documentation built on May 8, 2019, 3:43 p.m.