simsalapar-package: Tools for Simulation Studies in Parallel with R

simsalapar-packageR Documentation

Tools for Simulation Studies in Parallel with R

Description

Tools for setting up, conducting, and evaluating larger-scale simulation studies, including parallel computations, in R.

Details

The DESCRIPTION file: This package was not yet installed at build time.
Index: This package was not yet installed at build time.

Setting up a simulation

varlist()

creates a variable specification list.

dimnames2varlist()

creates a variable specification list from given dimension names.

getEl()

extracts elements from a variable list.

mkGrid()

function for creating a grid of all variables of type “grid”; see mkGrid().

mkNms()

builds a list of names from a variable list; see mkNms().

get.n.sim()

extracts “n.sim”; see get.n.sim().

get.nonGrids()

extracts all variables not of type “grid”; see get.nonGrids().

Conducting a simulation

tryCatch.W.E()

catching and storing warnings and errors simultaneously; see tryCatch.W.E().

doCallWE()

innermost computation (return value of doOne()): returns value, error, warning, and run time; see doCallWE().

LEseeds()

create a list of advanced .Random.seed's for “L'Ecuyer-CMRG”; see LEseeds().

printInfo()

displays information about the sub-job just finished; see printInfo().

subjob()

computes one row of the virtual grid in a simulation; see subjob().

mkTimer()

creates a function to be passed to doCallWE() as timer; see mkTimer().

doLapply()

sequentially iterates over all subjobs via standard lapply().

doForeach()

iterates over all subjobs in parallel (via foreach(), package foreach).

doRmpi()

iterates over all subjobs in parallel (via Rmpi's mpi.apply()).

doMclapply()

iterates over all subjobs in parallel (via mclapply()).

doClusterApply()

iterates over all subjobs in parallel (via clusterApply()).

Analysis

doRes.equal()

convenience wrapper for comparing two results of the do* lapply-like functions; see doRes.equal().

mkAL()

converts a list of named 5-lists to an array of lists; see mkAL().

saveSim()

(optionally) converts a result list to an array of lists using mkAL(); see saveSim().

maybeRead()

(optionally) reads the provided .rds; see maybeRead().

getArray()

gets an array of 4-lists and computes an array of values, errors, warnings, or run times; see getArray().

array2df()

conveniently converts an array to a data.frame.

toLatex():

an S3 method for varlist and ftable.

fftable()

essentially calls format.ftable() and adds attributes ncv and nrv to the return object.

tablines()

computes ingredients for converting a character matrix with attributes to a LaTeX table.

wrapLaTable()

wraps a table and tabular environment around the lines of the body of a LaTeX table.

mayplot():

a matrix-like plot for arrays up to rank 5, with grid and gridBase.

Author(s)

Marius Hofert and Martin Maechler <maechler@stat.math.ethz.ch>

Maintainer: Marius Hofert <marius.hofert@math.ethz.ch>

References

Publication

Marius Hofert, Martin Maechler (2016). Parallel and Other Simulations in R Made Easy: An End-to-End Study. Journal of Statistical Software, 69(4), 1–44. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v069.i04")}

Preprint (for simsalapar 1.0-0; including timing info):

Hofert, M. and Mächler, M. (2013). Parallel and other simulations in R made easy: An end-to-end study. https://arxiv.org/abs/1309.4402

Examples

## Not run:  
 demo(TGforecasts)

## End(Not run)

simsalapar documentation built on April 27, 2023, 9:05 a.m.