When I subset a data frame I get a number of rows with NA values
I've just been removing rows with all NA but I would like to know what's causing this.
When I subset a dataframe
(for example: df_subset <- df[df$num < 95,]
)
df_subset has alot of NA rows (rows where all the values are NA)
however, the number of rows is less than df (so it's not the rows not meeting the condition showing up as NA)
I also tried using which but I still have the same problem
df_subset <- df[which(df$num < 95),]