Learn R Programming

miniCRAN (version 0.2.4)

addPackageListingGithub: Add DESCRIPTION information from package on github.

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

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. "RevolutionAnalytics/checkpoint"
username
Optional character vector. Name of repository on github, e.g. "RevolutionAnalytics/checkpoint"
branch
name of branch, defaults to "master"

Examples

Run this code
# Create package database
pdb <- cranJuly2014

pdb <- pkgAvail(repos=c(CRAN="http://cran.revolutionanalytics.com"))
  
  
  # 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))

Run the code above in your browser using DataLab