Sum of an Array While Keeping its Attributes
sumKeepAttr.RdThis function returns the sum of an numeric array (e.g. vector or matrix) while keeping its attributes.
Arguments
- x
an numeric array (e.g. vector or matrix).
- keepNames
logical. Should the name(s) of the element(s) of
xbe assigned to the returned sum? (only relevant ifxhas only one element).- na.rm
logical. Passed to
sum. Should missing values be removed?
Value
the sum (see sum).