sumnrow | R Documentation |
Groups a matrix by rows, summing every Nth
row. Matrix should be multiple
of N
.
sumnrow(df, N, row_names = NULL)
df |
A matrix with named rows and columns. |
N |
Integer, specifying the resulting number or rows. |
row_names |
String vector of length |
A matrix with N
rows, where each row is the sum of every Nth
row
of the original matrix.
wio <- make_wio("wiodtest", quiet = TRUE)
sumnrow(wio$Y, wio$dims$N, paste0("WLD", "_",
gsub("^D", "", wio$names$n_names)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.