What is the most efficient way to create a new variable that increases by x units after every x rows? For example, I have a data frame:
d <- data.frame(gr