addPackageListingGithub: Add DESCRIPTION information from package on github.

Description Usage Arguments Examples

View source: R/github-functions.R

Description

Downloads the DESCRIPTION file from a package on github, parses the fields and adds (or replaces) a row in the available package database.

Usage

1
2
3
4
5
6
addPackageListingGithub(
  pdb = pkgAvail(),
  repo,
  username = NULL,
  branch = "master"
)

Arguments

pdb

Package database, usually the result of pkgAvail() or available.packages()

repo

Character vector. Name of repository on github, e.g. "andrie/rrd"

username

Optional character vector. Name of repository on github, e.g. "andrie/rrd"

branch

name of branch, defaults to "master"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Create package database
pdb <- cranJuly2014

## Not run: 
  pdb <- pkgAvail(repos = c(CRAN = getOption("minicran.mran")))

  # Overwrite pdb with development version of miniCRAN at github
  newpdb <- addPackageListingGithub(pdb = pdb, "andrie/miniCRAN")
  newpdb["miniCRAN", ]

  # Add package from github that's not currently on CRAN
  newpdb <- addPackageListingGithub(pdb = pdb, repo = "RevolutionAnalytics/checkpoint")
  newpdb["checkpoint", ]

  set.seed(1)
  plot(makeDepGraph("checkpoint", availPkgs = newpdb, suggests = TRUE))

## End(Not run)

miniCRAN documentation built on Sept. 16, 2020, 1:07 a.m.