GitLink: GitHub Link

Description Usage Arguments Value Functions Author(s) Examples

Description

Generates a link to a file on a specified GitHub repository.

Usage

1
2
3
4
5
GitLink(path = "", alt = NULL, raw = TRUE,
  user = getOption("GitHubUser"), repo = getOption("GitHubRepo"))

GitHubPages(path = "", alt = NULL, user = getOption("GitHubUser"),
  repo = getOption("GitHubRepo"))

Arguments

path

Character string specifying path to file in specified GitHub repository

alt

Character string specifying link text to display if knitr output is in HTML format.

raw

Logical specifying whether to link to the raw file at raw.githubusercontent.com. If 'FALSE', links to the file at github.com.

user, repo

Character string specifying GitHub username and repository, overriding any set in options. These values need not be provided if GitHub details have been set globally using ‘options(GitHubUser=’ms609', GitHubRepo='MorphoBank')'.

Value

A link to a file hosted on GitHub, formatted appropriately for HTML or Latex output

Functions

Author(s)

Martin R. Smith

Examples

1
2
3
4
5
6
{
  GitLink('ms609', 'MorphoBank')
  options(GitHubUser="ms609", GitHubRepo="MorphoBank")
  GitLink()
  GitHubPages()
}

ms609/MorphoBank documentation built on April 30, 2021, 4:12 p.m.