knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
My attempt to Advent Of Code as an R package. Each solution is stored as a function, and solution is given as an example for the function. Unit tests are also provided :)
You can install the released version of adventofcode from github with:
install.packages("adventofcode")
This is a basic example which shows you how to solve problem from day 1:
library(adventofcode) sum(sapply(day_1, fuel_requirement))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.