I have a data frame that consists of a morphological trait measured by various observers, at different dates. My goal here is to subset the data frame to remove the measurements made by one particular observer (condition 1: within factor level) before a certain date (condition 2: below given value).
Here is an example dataframe, where I would like to get rid of the measurements made by "A" before 2012-06-04:
obs <- rep(c("A", "B"), each=5)
date <- rep(c("2012-06-01", "2012-06-02","2012-06-03","2012-06-04","2012-06-05"), times=2)
size <- rnorm(10)
df <- data.frame(date, obs, size)
I tried to play with the subset
function to no avail. I am sure this must be easy!
Thanks!