getGithubFile | R Documentation |
The function retrieves one or more files from a Github repo via download.file.
getGithubFile(
github.user,
repo,
branch="master",
github.directory=NULL,
file.to.get=NULL,
local.directory="github_files",
file.type = "[.]R$|[.]Rmd$",
quiet=FALSE)
github.user |
Character. Name of github user or organization who owns the repo you want to get file(s) from. |
repo |
Character. The repo in which file(s) are located. |
branch |
Character. Repo branch in which to look. Default is ‘master’. |
github.directory |
Character. Additional directory structure within the repo branch in which to look. Default is NULL, meaning the whole repo. |
file.to.get |
Character. Specific (single) file to get within the |
local.directory |
Character. Local directory in which to download files. Default is ‘github_files’. A directory of this name will be created in the working directory if it does not already exist. |
file.type |
Character. Specific file type (or other special text in which to grep from the list of files in the repo) to limit files that are retrieved. Default is ‘[.]R$|[.]Rmd$’, which will get all .R and .Rmd files. |
quiet |
Boolean. Logical - should download progress be shown. Defaults to ‘FALSE’. See download.file for details. |
## Not run:
getGithubFile(github.user = "CenterForAssessment", repo = "SGP_Research",
github.directory = "Master_Documents/Skip_Year_Analysis/SGP_Report",
local.directory = file.path("assets", "github_children"), file.type = ".Rmd$")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.