rsums: Sum matrix rows and assign name to resulting column

View source: R/matrix_sum.R

rsumsR Documentation

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)

Arguments

df

A matrix with named rows and columns.

col_name

String, name to assign to resulting column.

Value

A column matrix (with rows and column names)

Examples

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

exvatools documentation built on May 29, 2024, 6:46 a.m.