Learn R Programming

switchr (version 0.14.8)

addPkg: addPkg

Description

Add a package to an object associated with a manifest

Usage

addPkg(
  x,
  ...,
  rows = makeManifest(...),
  versions = data.frame(name = manifest_df(rows)$name, version = NA_character_,
    stringsAsFactors = FALSE),
  replace = FALSE
)

# S4 method for PkgManifest addPkg( x, ..., rows = makeManifest(...), versions = data.frame(name = manifest_df(rows)$name, version = NA_character_, stringsAsFactors = FALSE), replace = FALSE )

# S4 method for SessionManifest addPkg( x, ..., rows = makeManifest(...), versions = data.frame(name = manifest_df(rows)$name, version = NA_character_, stringsAsFactors = FALSE), replace = FALSE )

Value

x, with the relevant package(s) added to it (in the case of a manifest) or its associated manifest.

Arguments

x

A manifest or manifest-associate objec tto add the pkg 2

...

The information regarding the package to place in the manifest

rows

An already-created data.frame to add to the manifest

versions

A data.frame of package names and versions, if adding to a SessionManifest, ignored otherwise

replace

logical. If true, the specified package info will replace any already in the manifest in the case of duplicates. Otherwise, an error is thrown.