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