sum | R Documentation |
Provides sum of elements.
sum(x, na.rm=FALSE)
x |
numeric or logical to be summed |
na.rm |
logical scalar. If |
This is an S4 generic function.
Return value depends on argument x
. If vector, returns the same as
sum
. If matrix, returns vector containing the sum of
each column.
P. Roebuck proebuck1701@gmail.com
sum(1:9)
sum(matrix(1:9, 3, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.