sum: MATLAB sum function

Description Usage Arguments Details Value Author(s) Examples

Description

Provides sum of elements.

Usage

1
sum(x, na.rm=FALSE)

Arguments

x

numeric or logical to be summed

na.rm

logical scalar. If TRUE, remove missing values

Details

This is an S4 generic function.

Value

Return value depends on argument x. If vector, returns the same as sum. If matrix, returns vector containing the sum of each column.

Author(s)

P. Roebuck proebuck@mdanderson.org

Examples

1
2
sum(1:9)
sum(matrix(1:9, 3, 3))


Search within the matlab package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.