Cumulative sums, products, minima and maxima for each row (column) in a matrix
Cumulative sums, products, minima and maxima for each row (column) in a matrix.
rowCumsums(x, rows = NULL, cols = NULL, dim. = dim(x), ...) colCumsums(x, rows = NULL, cols = NULL, dim. = dim(x), ...) rowCumprods(x, rows = NULL, cols = NULL, dim. = dim(x), ...) colCumprods(x, rows = NULL, cols = NULL, dim. = dim(x), ...) rowCummins(x, rows = NULL, cols = NULL, dim. = dim(x), ...) colCummins(x, rows = NULL, cols = NULL, dim. = dim(x), ...) rowCummaxs(x, rows = NULL, cols = NULL, dim. = dim(x), ...) colCummaxs(x, rows = NULL, cols = NULL, dim. = dim(x), ...)
Henrik Bengtsson
x <- matrix(1:12, nrow = 4, ncol = 3) print(x) yr <- rowCumsums(x) print(yr) yc <- colCumsums(x) print(yc) yr <- rowCumprods(x) print(yr) yc <- colCumprods(x) print(yc) yr <- rowCummaxs(x) print(yr) yc <- colCummaxs(x) print(yc) yr <- rowCummins(x) print(yr) yc <- colCummins(x) print(yc)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.