Learn R Programming

exvatools (version 0.9.0)

rsums: Sum matrix rows and assign name to resulting column

Description

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.

Usage

rsums(df, col_name = NULL)

Value

A column matrix (with rows and column names)

Arguments

df

A matrix with named rows and columns.

col_name

String, name to assign to resulting column.

Examples

Run this code
wio <- make_wio("wiodtest", quiet = TRUE)
rsums(wio$Y, "Y")

Run the code above in your browser using DataLab