Skip to contents

Create a DataSimEnrollment Object

Usage

custom_enrollment(fun, label)

Arguments

fun

A function that takes one argument n the number of enrollment times to observe and returns a vector of times.

label

A user-friendly label

Value

A DataSimEnrollment object

Examples

custom_enrollment(
  fun = function(n) rpois(n, lambda = 5),
  label = "Poisson enrollment distribution"
)
#> An object of class "DataSimEnrollment"
#> Slot "fun":
#> function (n) 
#> rpois(n, lambda = 5)
#> <environment: 0x55fbea906810>
#> 
#> Slot "label":
#> [1] "Poisson enrollment distribution"
#>