Learn R Programming

repo.data (version 0.1.5)

package_date: Find earliest date of compatibility

Description

Search the DESCRIPTION file for the release dates of dependencies and return the earliest date according to CRAN's archive. This is the date at which the package could be installed.

Usage

package_date(packages = ".", which = "strong")

Value

A vector with the datetimes of the published package (or current date if not published) and the datetime when the requirements were met. NA if not able to collect the data from CRAN.

Arguments

packages

Path to the package folder and/or name of packages published.

which

a character vector listing the types of dependencies, a subset of c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances"). Character string "all" is shorthand for that vector, character string "most" for the same vector without "Enhances", character string "strong" (default) for the first three elements of that vector.

Details

Currently this function assumes that packages only use ">=" and not other operators. This might change on the future if other operators are more used.

See Also

Other utilities: cran_date(), cran_doom(), cran_snapshot(), duplicated_alias(), package_repos(), repos_dependencies(), update_dependencies()

Examples

Run this code
package_date("ABACUS")
package_date("paramtest")
package_date("Seurat") # Dependencies on packages not on CRAN
package_date("afmToolkit") # Dependency was removed from CRAN

Run the code above in your browser using DataLab