Skip to contents

Returns the scenario's casualty cohort. Provided so a scenario can be piped straight into any function that expects a data frame.

Usage

# S3 method for class 'scenario'
as_tibble(x, ...)

Arguments

x

A scenario object.

...

These dots are for future extensions and must be empty.

Value

The cohort tibble held by the scenario.

Examples

sc <- sdt_scenario(sdt_synthetic_cohort(n = 5, seed = 1))
tibble::as_tibble(sc)
#> # A cohort: 5 casualties
#> # Triage:   red: 3 yellow: 1 green: 1
#>   id      age sex   life_points ventilated injury_region triage therapy
#>   <chr> <int> <chr>       <int> <lgl>      <chr>         <chr>  <chr>  
#> 1 P001     42 m               1 TRUE       head          red    TASC   
#> 2 P002     78 m               1 TRUE       extremity     red    TASC   
#> 3 P003     53 m               5 FALSE      abdomen       green  none   
#> 4 P004     30 f               4 FALSE      thorax        yellow TASC   
#> 5 P005     25 m               2 FALSE      thorax        red    DCS    
#> # ℹ 1 more variable: arrival_order <int>