by Ben | Jul 26, 2014 | R |

Rolling joins are commonly used for analyzing data involving time. A simple example – suppose you have a table of product sales and a table of commercials. You might want to associate each product sale with the most recent commercial that aired prior to the...
by Ben | Jul 25, 2014 | R |

The data.table package in R provides fast methods for handling large tables of data with very simplistic syntax. The following is an introduction to the basic join operations available using the data.table package. Suppose you have two data.tables – a table of...
by Ben | Jul 21, 2014 | R |

A factor variable (commonly called a categorical variable outside of R) is a variable that takes on a limited set of values. For example, days of the week {Sunday, Monday, etc.} or the set of colors {Red, Blue, Green} should be a factor. By contrast, a vector of...
by Ben | Jul 9, 2014 | Actuarial Science |

When I was in high school, I knew I wanted to pursue a career involving math. I did an internship working for some mechanical engineers at an oil platform consultant company, but I never witnessed my mentors do more than basic geometry or algebra. That’s when I...