Skip to content

Instantly share code, notes, and snippets.

@jenrichmond
jenrichmond / spintest.R
Created October 6, 2022 04:54
use knitr::spin to convert script to markdown
#' this script demos how to use knitr::spin to turn a .R script into a knitted markdown
#' these funny hash/tick comments will be read in the .md doc as text
#' everything else will be run as a code chunk
#' to use spin, in the console run knitr::spin(file = spintest.R)
#' you will end up with a .md doc in your files, open it and knit to html
#' load packages
library(tidyverse)