The other day a colleague of mine ran into an issue where NA values were appearing in their dataset that weren’t there before - it was strange stuff! A close look revealed some interesting things, that I thought might be worthwhile briefly going into. It is to do with the use of [] when subsetting, and how this is different to base::subset and dplyr::filter. Let’s start by creating a dataset, …