getGitHubRef: Get GitHub reference from package

Description Usage Arguments Value Examples

View source: R/package-installation-methods.R

Description

If a package is installed from GitHub this function tries to retrieve the reference (i.e. user name, repository name, and commit) from (a) the provided sessionInfo, or (b) locally, and only if the package is installed (!), using session_info.

Usage

1
getGitHubRef(pkg, pkgs = c(sessionInfo()$otherPkgs, sessionInfo()$loadedOnly))

Arguments

pkg

The name of the package to retrieve the reference for

pkgs

Lists of packages from a sessionInfo object

Value

A character string with a short refernce, e.g. r-hub/sysreqs@481d263, NA is nothign could be found

Examples

1
2
3
4
## Not run: 
getGitHubRef(rsysreqs)

## End(Not run)

o2r-project/containerit documentation built on June 28, 2021, 2:46 p.m.