with_params {edibble}R Documentation

This is a helper function to set the parameter values

Description

This is a helper function to set the parameter values

Usage

with_params(..., .censor = NA, .aggregate = NULL)

Arguments

...

A series of name-value pair that are inputs used for the simulation process.

.censor

The value to censor if it outside the valid values. If the value has a lower and upper bound then it should be a vector of size 2. Use -Inf or Inf if you don't want to censor either value. You can use a list if you want a different censoring for different records where the name corresponds to the name of the record. If you want to apply a default value/function for censoring then use the name ".default". You can use a function instead of a value. The function may be specified by as a lambda function. The object .lower and .upper are special reserved values, corresponding to the limits given from valid values, that can be used within this function.

.aggregate

The function for aggregation if the response values differ within the same unit level for the record. Use NA if you don't want to aggregate. By default, it will get the mean or mode depending on the encoding (numeric is mean, mode for character or factor), or if absent, based on returned encoding. It can be a named list where the names correspond to the record name and the values corresponding to a function.

See Also

simulate_rcrds()


[Package edibble version 1.1.1 Index]