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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.