I have daily data (df$date
is the daily field):
Which I want to group by week (df$wbm
= "week beginning monday") in a new data frame (df2
). When I run the below statement, the data frame that is returned is the same as the original:
df2<- df%>%
group_by(wbm)
The function runs without throwing an error, but it just produces the same data frame.
How can I drop date
and ensure that my variables are grouped by wbm
?