snippr (version 0.0.0.9000)

snippets_install_github: Install one or more snippets from a GitHub repository

Description

Install one or more snippets from a GitHub repository. These should be in the form of one or more <language>.snippets files in the top-level directory. .snippets files that are not

Usage

snippets_install_github(repo, name = NULL, language = NULL,
  directory = SNIPPET_DIRECTORY)

Arguments

repo

Username and repository name, e.g. "dgrtwo/snippets"

name

name of snippet to install, which must be given along with a language. If NULL, installs all snippets from the language.

language

Language from repo to install. If NULL, installs all snippets

directory

Directory to install snippets to

Details

The directory argument is available mainly for testing purposes.

Examples

Run this code
# NOT RUN {
snippets_install_github("dgrtwo/snippets")

# install just R or C/C++
snippets_install_github("dgrtwo/snippets", language = "r")
snippets_install_github("dgrtwo/snippets", language = "c_cpp")

# install just a single snippet
snippets_install_github("dgrtwo/snippets", language = "r", name = "S3")

# }

Run the code above in your browser using DataLab