Is it possible to remove rows of data by referencing specific character strings or factor levels from 2 or more columns? For small datasets, this is easy because I can just scroll through the dataframe and remove the row I want, but how could this be achieved for larger datasets without endlessly scrolling to see which rows match my criteria?
Fake data:
df1 <- data.frame(year = rep(c(2019, 2020), each = 10),
month = rep(c("March", "October"), each = 1),
site = rep(c("1", "2", "3", "4", "5"), each = 2),
common_name = rep(c("Tuna", "shark"), each = 1),
num = sample(x = 0:2, size = 20, replace = TRUE))
For example: How do I remove only site "1" in March of 2019 in one line of code and without looking at which row it's in?