powered by
Improved version of colSums() for matrix output. The sum of columns is kept as a row vector with column names and the resulting row can be named in the same command.
colSums()
csums(df, row_name = NULL)
A row matrix (with rows and column names)
A matrix with named rows and columns.
String, name to assign to resulting row.
wio <- make_wio("wiodtest", quiet = TRUE) csums(wio$Y, "TOTAL_Y")
Run the code above in your browser using DataLab