Source a file hosted in a pubic or private GitHub repo
source_github(repo, branch = "master", file, auth = Sys.getenv("GITHUB_PAT"))
Name of the GitHub repository in the form "user/repo"
.
Branch from which to source the file (default master).
Filename to source, including relative path.
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/.
if (FALSE) { # \dontrun{
repo = "PredictiveEcology/SpaDES"
branch = "development"
file = "_ignore/thinSpatialPolygons.R"
auth = "" ## your Personal Access Token
source_github(repo, branch, file, auth)
} # }