Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cumsum.ff

Cumulative Sums, Products, and Extremes


Description

Cumulative Sums, Products, and Extremes

Usage

## S3 method for class 'ff'
cumsum(x, ...)

## S3 method for class 'ff'
cumprod(x, ...)

## S3 method for class 'ff'
cummax(x, ...)

## S3 method for class 'ff'
cummin(x, ...)

Arguments

x

ff numeric vector or an object that can be coerced to one a numeric vector

...

other parameters passed on to chunk

Value

An ff vector of the same length and type as x (after coercion), except that cumprod returns a numeric vector for integer input.
An NA value in x causes the corresponding and following elements of the return value to be NA, as does integer overflow in cumsum (with a warning).

See Also

Examples

x <- 1:10000
tmp <- cumsum(ff(x))
class(tmp)
table(tmp[] == cumsum(x))

x <- rnorm(1000)
tmp <- cummax(ff(x))
table(tmp[] == cummax(x))
tmp <- cummin(ff(x))
table(tmp[] == cummin(x))
tmp <- cumprod(ff(x))
table(tmp[] == cumprod(x))

## S3 type of calling
cumsum(ff(x))
cummax(ff(x))
cummin(ff(x))
cumprod(ff(x))

ffbase

Basic Statistical Functions for Package 'ff'

v0.13.3
GPL-3
Authors
Edwin de Jonge, Jan Wijffels, Jan van der Laan
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.