I have taken the iris data.frame and then filtered out the "setosa" from the species.
when i do tapply()
, it gives me a summary of all 3 things that were originally in that column. why does it show me setosa as NA. It shouldnt know about setosa!!!
library(dplyr)
a <-filter(iris, Species != "setosa")
tapply(a$Sepal.Length, a$Species, mean)
Result:
tapply(a$Sepal.Length, a$Species, mean)
# setosa versicolor virginica
# NA 5.936 6.588
what am i missing?