This function builds a URL in the form: https://raw.githubusercontent.com/<username>/<repo>/<branch>/<path>.

from_repo(username, repo, path, branch = "master")

Arguments

username

A string. The owner of the repo.

repo

A string. The name of the repo.

path

A string. The path to the file.

branch

A string. The branch the file is on.

Value

An URL to the path.

Examples

from_repo( username = "liao961120", repo = "getable", path = "docs/demo/data/df.json", branch = "master")
#> [1] "https://raw.githubusercontent.com/liao961120/getable/master/docs/demo/data/df.json"
renderTable( from_repo( username = "liao961120", repo = "getable", path = "docs/demo/data/df.json", branch = "master") )
#> [1] "<div id=\"data-from-web-1\" data-url=\"https://raw.githubusercontent.com/liao961120/getable/master/docs/demo/data/df.json\" class=\"data-from-web-json df-from-web\"></div>" #> attr(,"class") #> [1] "getable.html.tag"