See the sumrows argument to stable(). This function can be called multiple times and will accumulate sumrows data.

st_sumrow(x, pattern = NULL, cols = names(x$data), rows = integer(0), ...)

Arguments

x

an stobject

pattern

a regular expression to search in the data frame; when this argument is provided, rows are calculated using df_grep_rows()

cols

a character vector of column names to search

rows

integer or logical vector of rows that are summary rows

...

passed to sumrow()

Details

Please take careful note of the argument order for st_sumrow() compared to sumrow().