In R,
%>%
filter(SpecimenDate >= as.Date("2021-10-25") & SpecimenDate <= as.Date("2021-10-31"))
Provides a manual filter and
%>%
filter(date == max(date))
Filters to the most recent date of data within a table only.
Can anyone advise please how to create a filter that sorts between max(date)) and max(date))-7 (i.e. all values within most recent 7 days)?
I've attempted the below which leads to Error: Problem with filter()
input ..1
.
i Input ..1
is date >= max(date) & date <= max(date - 7)
.
x non-numeric argument to binary operator
filter(date >= max(date) & date <= max(date-7)
Thank you.