Could someone please help me insert the group_by function (or any function that would do the trick)into this:
df$buy <-ifelse( ( (df$month %in% c(201909