roll_apply_par: Rolling apply a function on a data frame or matrix.

Description Usage Arguments Value Examples

Description

Rolling apply a function on a data frame or matrix.

Usage

1
2
roll_apply_par(data, width, FUN, ..., parallel = FALSE, .export = NULL,
  .packages = NULL, progress = FALSE)

Arguments

data

A data frame or a matrix.

width

The rolling windown size.

FUN

function whose first parameter is the data.

...

Additional parameter passed to FUN

parallel

parallel computing. Default is FALSE. If parallel is positive, parallel is the number of cores. If parallel is negative, the number of cores is detectCores() + parallel

.export

character vector of variables to export. Default is NULL.

.packages

character vector of packages that tasks depends on.

progress

Create a progress bar. Default FALSE.

Value

A list of result.

Examples

1
res <- roll_apply_par(matrix(seq(10^4 * 3), ncol = 3), 100, function(m) eigen(cov(m))$values, parallel = TRUE, progress = TRUE)

fountainer/fountainr documentation built on May 16, 2019, 1:51 p.m.