as_function {simulist} | R Documentation |
Convert <epiparameter>
or NULL
to function
Description
An extension to as.function()
, particularly the epiparameter
as.function
S3 method, with the added feature that NULL
s are converted
into functions that generate a vector of NA
s to behave equivalently to
the generator functions output from
as.function(..., func_type = "generate")
.
If a function is already passed to as_function
it will be returned
unchanged.
There is also input checking to error if input is not an <epiparameter>
,
function
(closure), or for onset-to-event distributions NULL
.
Usage
as_function(x)
Arguments
x |
A named list containing either |
Value
A list of function
s.
[Package simulist version 0.5.0 Index]