jubilee.mcsapply: Wrapper to calculate 'sapply' using multi-core

Description Usage Arguments Value Author(s) Examples

Description

This utility calculates sapply using multi-core capability. It is a simple wrapper on simplify2array and parallel::mclapply. It is particularly convenient on Linux and Mac when parallelism saves significant amount of computing time.

Usage

1

Arguments

x

numeric

FUN

the function to be applied to each element of x

...

optional arguments to FUN

Value

numeric

Author(s)

Stephen H. Lihn

Examples

1
2
   a <- seq(1,100)
   jubilee.mcsapply(a, function(x) x^2) # use multi-core!

jubilee documentation built on Jan. 24, 2020, 5:10 p.m.