R-code Code snippets that I use often, with comments. Most code uses data from base R. The logistic regression code uses candy-data.csv, from https://github.com/fivethirtyeight/data, under a Creative Commons Attribution 4.0 International License.