Learning R: Dealing Playcards

Introduction There are lots of benefits to learning a computer language, even if only learning enough to make yourself dangerous to your own computer. In this post, I’ll provide a purposely dumb way to shuffle playing cards and deal hands to different players. In doing so, I will demonstrate a variety of basic operations in the R language. # This is a comment. We write comments for future programmers # to be able to read and understand our code.

Randomization Inference: A Simple Example

Randomization Inference is a non-parametric method for calculating p-values for hypothesis tests. This post provides a simple example to show how to do RI in R.

Using pdftools to Extract Vote Data

Introduction Suppose you are a concerned citizen who would like to know how voters in a state voted. Perhaps you are a voter in a state with rampant corruption or perhaps you are a voter in a state that does not have paper backups for voting machines. Perhaps you are just masochistic enough to be interested in pulling tables out of reasonably well formed pdfs. The following is a code example for the last one.