source_gist: Source a gist from GitHub

Description Usage Arguments Value Examples

Description

This function downloads the files in the specified gist and then sources them using the source() function.

Usage

1

Arguments

gist

(string) The ID of the gist.

files

(character, optional) The files to source. If not specified all the files in the gist will be sourced.

...

Parameters passed to gh_request().

Value

source_gist() returns the result of sourcing the files.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

  # Source all the files in a gist
  source_gist("806dca6b09a39e7b6326a0c8137583e6", "./gist")

  # Source a single file in a gist
  source_gist(
    gist  = "806dca6b09a39e7b6326a0c8137583e6",
    path  = "./gist",
    files = "helloworld.R"
  )


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.