GitLink: GitHub Link

GitLinkR Documentation

Description

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

Usage

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

  • GitHubPages: A link to 'user'.github.io/'repo'/

Author(s)

Martin R. Smith

Examples

{
  GitLink('ms609', 'MorphoBank')
  options(GitHubUser="ms609", GitHubRepo="MorphoBank")
  GitLink()
  GitHubPages()
}

ms609/MorphoBank documentation built on June 9, 2024, 6:04 p.m.