Displaying 1 result from an estimated 1 matches for "tp4130179p4143909".
Did you mean:
tp4130179p4143329
2011 Dec 02
2
Moving column averaging
# need zoo to use rollapply()
# your data (I called df)
df <- structure(list(a = 1:2, b = 2:3, c = c(5L, 9L), d = c(9L, 6L),
e = c(1L, 5L), f = c(4, 7)), .Names = c("a", "b", "c", "d",
"e", "f"), class = "data.frame", row.names = c(NA, -2L))
# transpose and make a zoo object
df2 <- zoo(t(df))
#rollapply to get