addPkg: addPkg

addPkgR Documentation

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 signature 'PkgManifest'
addPkg(
  x,
  ...,
  rows = makeManifest(...),
  versions = data.frame(name = manifest_df(rows)$name, version = NA_character_,
    stringsAsFactors = FALSE),
  replace = FALSE
)

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

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.

Value

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


switchr documentation built on March 31, 2023, 5:13 p.m.