Skip to content

Instantly share code, notes, and snippets.

@zohaad
Created February 27, 2018 14:58
Show Gist options
  • Save zohaad/89f4b64d98844b5115c894aba441749e to your computer and use it in GitHub Desktop.
Save zohaad/89f4b64d98844b5115c894aba441749e to your computer and use it in GitHub Desktop.
data <- data.frame(1:110, 1:110)
for (i in seq(1, nrow(data), 10)) {
x <- colMeans(data[i:i+9,])
print(x)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment