knitr::opts_chunk$set(echo = TRUE)

R Markdown

This is a collection of my commonly used functions.

# create a package
install.packages(c("devtools","roxygen2"))
library("devtools")
library("roxygen2")
create("jcpackr")

# put functions in R folder

# Process documentation
setwd("./jcpackr")
document()
devtools::build_vignettes() # Build vignette

# install local version
setwd("~/github/")
install("jcpackr")
?cat_function

# install github version
devtools::install_github("j23414/jcpackr")
library(jcpackr)
?cat_function

Slightly modified R package instructions from Writing an R Package From Scratch.



j23414/jcpackr documentation built on May 18, 2019, 7:15 a.m.