This is because of a weird behaviour when "subsetting" a dataframe, see this tweet for details: https://twitter.com/daattali/status/761051935197634562