from_repo: Build URL to a file from GitHub Repository

Description Usage Arguments Value Examples

View source: R/render.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from_repo(
    username = "liao961120",
    repo = "getable",
    path = "docs/demo/data/df.json",
    branch = "master")
renderTable(
  from_repo(
    username = "liao961120",
    repo = "getable",
    path = "docs/demo/data/df.json",
    branch = "master")
)

getable documentation built on Oct. 23, 2020, 8:07 p.m.