hyperloop: hyperloop

View source: R/hyperloop.R

hyperloopR Documentation

hyperloop

Description

Runs a function several times with all parameter combinations:

Usage

hyperloop(FUN, ..., .simplify = FALSE)

Arguments

FUN

function with named parameter(s)

...

named parameters which contain lists with possible parameter values

.simplify

logical: should the result be simplified to a data frame if possible? (default: FALSE)

Details

  • If an argument is not a list then it will be converted to a one element list.

  • If an error occurs then the result of FUN will not be stored-

Value

a hyperloop object as list

Examples

x   <- rnorm(100)
trm <- hyperloop(mean, x=list(x), trim=as.list(seq(0, 0.5, by=0.05)))
# automatic conversion of x to list(x)
trm <- hyperloop(mean, x=x, trim=as.list(seq(0, 0.5, by=0.05))) 
unlist(trm)

sigbertklinke/exams2moodle documentation built on July 6, 2023, 3:26 p.m.