1

I have a dataset with 13 species under one column "species name" and need to remove 3 of them from the dataset before analysis. So using the iris data as an example, to remove 1 of them I know it would be something like

iris <- subset(iris, Species!="versicolor")

or if I wanted to keep one of them,

iris <- iris[iris$Species == "setosa", ]

But I can't figure out the code if I wanted to remove/keep more than 1 species. Any help would be appreciated!

lichess
  • 11
  • 1

0 Answers0