Useful YAML options for generating HTML reports in R

A few neat tricks to make Rmarkdown reports more readable

Programmatically create new headings and outputs in Rmarkdown

Even though I do this fairly often, I keep forgeting its recipe. I might as well write it down and save time for my future self and others like me.

Understanding Lasso and Ridge Regression

To understand how these algorithms work, let's make up a toy data frame about shark attacks. Imagine that we are trying to find out the factors that are associated with the number of shark attacks at a given location.