dput(high = [28,27,25,26,27,28,29])
For the column high: I need to take the first seven values and calculate the max then for the next seven values and so on
my code:
diffThigh <-0
m=1
for (i in seq(1, 871, by=6)){
print(i)
diffThigh[m] <- (max(Dataset_1$high[i:i+6]))
i=i+1
m=m+1
}
diffThigh
The array I get has wrong values