A “dummy” or “indicator” variable takes on a value of either 0 or 1. The appeal of these particular values is that they are numerical and can be used with routines that only accept numerical data ...
We often want to “subset” our data. That is, we only want to look at data for a certain year, or from a certain class products or customers. We generally call this process “filtering” in Excel or ...
See how to join two data sets by one or more common columns using base R’s merge function, dplyr join functions, and the speedy data.table package. R has a number of quick, elegant ways to join data ...
How do I do that in data.table? Find code for dozens of data tasks in this searchable cheat sheet of R data.table and Tidyverse code. Speed. Concise syntax. Backwards compatibility. But especially ...