Learn R Programming

switchr (version 0.14.8)

findNewestPkgInds: Find newest packages in a package info data.frame

Description

Find newest packages in a package info data.frame

Usage

findNewestPkgInds(df, pkgcol = "package", verscol = "version")

findNewestPkgRows( df, pkgcol = "package", verscol = "version", newcol = "new", verbose = FALSE, logfun = message )

Value

a data.frame with the same columns as df which contains only the most recent row for each unique package name, as determined by the contents of df[[verscol]]

for findNewestPkgInds, the indices of the rows representing the newest version of each package within df. For findNewestPkgRows, the rows themselves from df representing the newest version of each package.

Arguments

df

data.frame. Table of package information

pkgcol

string. Name of column containing package name

verscol

string. Name of column containing package version in version-string form.

newcol

character. Experimental. column name for the column indicating that the version is new.

verbose

logical. Should debugging information be written using logfun during this process.

logfun

function. Logging function (closure) which should be called to write verbose logging messages during the process.