Skip to contents

If path is a directory, looks for PACKAGES.rds, then PACKAGES.gz, then plain PACKAGES and reads the first one found. If path is a file, reads based on its extension: "" (plain PACKAGES), "gz" (PACKAGES.gz), or "rds" (PACKAGES.rds).

Usage

pkg_index_read(path)

Arguments

path

Directory containing PACKAGES* or a specific PACKAGES* file.

Value

A pkg_index.

Examples

if (FALSE) { # \dontrun{
idx <- pkg_index_read("path/to/repo/src/contrib")
idx2 <- pkg_index_read("path/to/repo/src/contrib/PACKAGES.rds")
} # }