When you want to install R packages from GitHub, but you can't access GitHub, this function helps you download and install R packages from GitHub via the proxy website <https://gh-proxy.com/> or <https://ghfast.top/>, which is in real-time sync with GitHub.
install_github(
repo,
subdir = NULL,
ref = NULL,
upgrade = c("default", "ask", "always", "never"),
force = FALSE,
quiet = FALSE,
build = TRUE
)Repository address in the format username/repo.
A sub-directory within a git repository that may contain the package we are interested in installing.
Name of branch, tag or SHA reference to use, if not HEAD.
Should package dependencies be upgraded? One of "default", "ask", "always", or "never". "default" respects the value of the R_REMOTES_UPGRADE environment variable if set, and falls back to "ask" if unset. "ask" prompts the user for which out of date packages to upgrade. For non-interactive sessions "ask" is equivalent to "always". TRUE and FALSE are also accepted and correspond to "always" and "never" respectively.
Force installation, even if the remote state has not changed since the previous install.
If TRUE, suppress output.
If TRUE build the package before installing.
# Example(Not run)
# install_github("yihui/xfun")
Run the code above in your browser using DataLab