sum.list {StabPerf}R Documentation

Function for summing the contents of a 'list'

Description

Sums the contents of a list, extending the functionality of base::sum

Usage

sum.list(list, na.rm=FALSE)

Arguments

list list.

Details

This function extends the base::sum function and redefines the standard sum function to be a generic function, which is delegate to this function automatically, when it receives a paramter of type list. This function internally uses + and should be defined for the type of objects you wish to sum.

Value

list Depends on type of objects contained in list

See Also

sum

Examples

# Returns c(6,7)
sum(list(1, 2, NA, 3:4), na.rm=FALSE)

[Package StabPerf version 0.5 Index]