Cumulative Sums, Products, Extremes and lagged differences
Source:R/integer64.R
cumsum.integer64.Rd
Cumulative Sums, Products, Extremes and lagged differences
Value
cummin()
, cummax()
, cumsum()
and cumprod()
return a integer64 vector of the same length as their input
diff()
returns a integer64 vector shorter by lag*differences
elements
Examples
cumsum(rep(as.integer64(1), 12))
#> integer64
#> [1] 1 2 3 4 5 6 7 8 9 10 11 12
diff(as.integer64(c(0,1:12)))
#> integer64
#> [1] 1 1 1 1 1 1 1 1 1 1 1 1
cumsum(as.integer64(c(0, 1:12)))
#> integer64
#> [1] 0 1 3 6 10 15 21 28 36 45 55 66 78
diff(cumsum(as.integer64(c(0,0,1:12))), differences=2)
#> integer64
#> [1] 1 1 1 1 1 1 1 1 1 1 1 1