Calculate column-wise or row-wise sum

sp_sums_Rcpp(sp_data, rowSums = FALSE)

Arguments

sp_data

A sparse matrix

rowSums

A boolean value, whether to calculate row-wise sum

Value

A n x 1 or p x 1 matrix