source_github: Source a file hosted in a pubic or private GitHub repo

Description Usage Arguments Author(s) Examples

View source: R/source_github.R

Description

Source a file hosted in a pubic or private GitHub repo

Usage

1
source_github(repo, branch = "master", file, auth = Sys.getenv("GITHUB_PAT"))

Arguments

repo

Name of the GitHub repository in the form "user/repo".

branch

Branch from which to source the file (default master).

file

Filename to source, including relative path.

auth

Personal Access Token to use for authorization. Required to access files in private repositories. By default, checks for GITHUB_PAT environment variable. See https://help.github.com/articles/creating-an-access-token-for-command-line-use/.

Author(s)

Alex Chubaty

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
repo = "PredictiveEcology/SpaDES"
branch = "development"
file = "_ignore/thinSpatialPolygons.R"
auth = "" ## your Personal Access Token

source_github(repo, branch, file, auth)

## End(Not run)

achubaty/amc documentation built on April 6, 2021, 6:56 a.m.