powered by
Groups a matrix by rows, summing every Nth row. Matrix should be multiple of N.
Nth
N
sumnrow(df, N, row_names = NULL)
A matrix with N rows, where each row is the sum of every Nth row of the original matrix.
A matrix with named rows and columns.
Integer, specifying the resulting number or rows.
String vector of length N, with names to assign to the resulting rows.
wio <- make_wio("wiodtest", quiet = TRUE) sumnrow(wio$Y, wio$dims$N, paste0("WLD", "_", gsub("^D", "", wio$names$n_names)))
Run the code above in your browser using DataLab