Description Usage Arguments Value Examples
A remote repo can be specified in two ways:
parse_github_url()
handles HTTPS and SSH remote URLs
and various GitHub browser URLs
parse_repo_spec()
handles this concise form:
[username/]repo[/subdir][#pull|@ref|@*release]
1 2 3 4 5 | parse_repo_spec(repo)
parse_github_repo_spec(repo)
parse_github_url(repo)
|
repo |
Character scalar, the repo specification. |
List with members: username
, repo
, subdir
ref
, pull
, release
, some which will be empty.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | parse_repo_spec("metacran/crandb")
parse_repo_spec("jimhester/covr#47") ## pull request
parse_repo_spec("jeroen/curl@v0.9.3") ## specific tag
parse_repo_spec("tidyverse/dplyr@*release") ## shorthand for latest release
parse_repo_spec("r-lib/remotes@550a3c7d3f9e1493a2ba") ## commit SHA
parse_repo_spec("igraph=igraph/rigraph") ## Different package name from repo name
parse_github_url("https://github.com/jeroen/curl.git")
parse_github_url("git@github.com:metacran/crandb.git")
parse_github_url("https://github.com/jimhester/covr")
parse_github_url("https://github.example.com/user/repo.git")
parse_github_url("git@github.example.com:user/repo.git")
parse_github_url("https://github.com/r-lib/remotes/pull/108")
parse_github_url("https://github.com/r-lib/remotes/tree/name-of-branch")
parse_github_url("https://github.com/r-lib/remotes/commit/1234567")
parse_github_url("https://github.com/r-lib/remotes/releases/latest")
parse_github_url("https://github.com/r-lib/remotes/releases/tag/1.0.0")
|
$package
[1] ""
$username
[1] "metacran"
$repo
[1] "crandb"
$subdir
[1] ""
$ref
[1] ""
$pull
[1] ""
$release
[1] ""
$package
[1] ""
$username
[1] "jimhester"
$repo
[1] "covr"
$subdir
[1] ""
$ref
[1] ""
$pull
[1] "47"
$release
[1] ""
$package
[1] ""
$username
[1] "jeroen"
$repo
[1] "curl"
$subdir
[1] ""
$ref
[1] "v0.9.3"
$pull
[1] ""
$release
[1] ""
$package
[1] ""
$username
[1] "tidyverse"
$repo
[1] "dplyr"
$subdir
[1] ""
$ref
[1] ""
$pull
[1] ""
$release
[1] "*release"
$package
[1] ""
$username
[1] "r-lib"
$repo
[1] "remotes"
$subdir
[1] ""
$ref
[1] "550a3c7d3f9e1493a2ba"
$pull
[1] ""
$release
[1] ""
$package
[1] "igraph"
$username
[1] "igraph"
$repo
[1] "rigraph"
$subdir
[1] ""
$ref
[1] ""
$pull
[1] ""
$release
[1] ""
$username
[1] "jeroen"
$repo
[1] "curl"
$ref
[1] ""
$pull
[1] ""
$release
[1] ""
$username
[1] "metacran"
$repo
[1] "crandb"
$ref
[1] ""
$pull
[1] ""
$release
[1] ""
$username
[1] "jimhester"
$repo
[1] "covr"
$ref
[1] ""
$pull
[1] ""
$release
[1] ""
$username
[1] "user"
$repo
[1] "repo"
$ref
[1] ""
$pull
[1] ""
$release
[1] ""
$username
[1] "user"
$repo
[1] "repo"
$ref
[1] ""
$pull
[1] ""
$release
[1] ""
$username
[1] "r-lib"
$repo
[1] "remotes"
$ref
[1] ""
$pull
[1] "108"
$release
[1] ""
$username
[1] "r-lib"
$repo
[1] "remotes"
$ref
[1] "name-of-branch"
$pull
[1] ""
$release
[1] ""
$username
[1] "r-lib"
$repo
[1] "remotes"
$ref
[1] "1234567"
$pull
[1] ""
$release
[1] ""
$username
[1] "r-lib"
$repo
[1] "remotes"
$ref
[1] ""
$pull
[1] ""
$release
[1] "*release"
$username
[1] "r-lib"
$repo
[1] "remotes"
$ref
[1] "1.0.0"
$pull
[1] ""
$release
[1] ""
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.