sum.modello_number: Sum

Description Usage Arguments Value Author(s) Examples

Description

Sum function

Usage

1
2
## S3 method for class 'modello_number'
sum(x, k = 0, ...)

Arguments

x

a reference object of class 'number'

k

integer, dimension along wihich do the reduction. Currently constrained to be <= 2

...

numerics to sum. Ignored for modello_numbers

Value

Returns a 'numeric' or reference object of class 'number'

Author(s)

Filippo Monari

Examples

1
2
3
4
5
6
modello.init(10, 10, 10, 10)
x = number(rep(1, 20))
y = sum(x)
print(y)
print(y$v)
modello.close()

modello documentation built on Feb. 2, 2021, 9:06 a.m.