githubGet | R Documentation |
Given the file name, repository, and commit/tag/branch, downloads the specified (public) file from GitHub unless it already exists or is forced. Does not support private repositories or directories.
githubGet(file, repo, commit, dir = "./", force = FALSE, sha256 = NULL, ...)
file |
The name of the file to download |
repo |
The repository to download from, e.g. "Jefferys/JefferysRUtils" |
commit |
The commit, tag, or branch to download. |
dir |
The directory to download to, by default the current working directory. |
force |
Download and over-write if already exists in output directory. |
sha256 |
Expected SHA256 checksum. |
... |
Other parameters to pass through to download.file |
The exit code from download.file - 0 for success, positive integer for error, and NA if not attempted due to an existing file.
## Not run:
githubGet( "README.Rmd", repo= Jefferys/JefferysRUtils,
commit= 'e5dab82f022afa311be9d078d3e080fb88a2cfaf' )
githubGet( "README.Rmd", repo= Jefferys/JefferysRUtils,
commit= 'dev' )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.