How would I remove all rows containing the numeric '0' in Farmland across the entire data?
example of data:
dat <- read.csv("Bird_Dataset_2019.csv")
df <- aggregate(Farmland~ Species + Year + GRIDREF, data = dat, subset = Species == 'Turtle Dove', sum)
I have tried this code df[!apply(df, 1, function(x) any(df > 1)), ]
but it returns the original dataset with warnings.
I expect looping and removing all rows by ID that have 0 in Farmland.