knitr::opts_chunk$set(echo = TRUE)
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.