fetch_github_data: Function to fetch files from GitHub.

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Modified from: https://gist.github.com/ritchieking/5de10cde6b46f3536967a908fe806b5f This is a general function for fetching data from GitHub. This makes it possible to host small amounts of configuration data and parameters on the web by hosting it in a repo.

Usage

1
fetch_github_data(repo, path, gh_root = "")

Arguments

repo

Is the name of the repository.

path

Is the path in the repo to the file.

gh_root

If set to "" will try to access the file from your saved GitHub username. If a group is given, will attempt to fetch from that another GitHub account or organization.

Value

The file as raw text from a GitHub repo.

Examples

1
2
3
raw_file <- fetch_github_data(repo="Lab_Configs",
  path="datatracker/lab_cfg.json",
  gh_root="DecisionNeurosciencePsychopathology")

DecisionNeurosciencePsychopathology/DataTracker documentation built on Jan. 20, 2022, 4:51 p.m.