powered by
Groups a matrix by columns, by summing blocks of columns of size n each. Matrix columns should be multiple of n.
sumgcols(df, n, col_names = NULL)
A matrix where each column is the sum of groups of n columns of the original matrix.
A matrix with named rows and columns.
Integer, specifying the size of each group.
String vector of length n, with names to assign to the resulting columns.
wio <- make_wio("wiodtest", quiet = TRUE) sumgcols(wio$Yfd, wio$dims$FD, wio$names$g_names)
Run the code above in your browser using DataLab