Simulate inhalation rates
Details
The age column of the optional IR_params
data frame should be in ascending
order and represent the lower value of age groups for the corresponding mean
and sd values. When not provided, the default values will come from Table 6.7
of EPA's 2011 Exposure Factors Handbook using the mean of male and female
values.
Examples
# Single atomic vector
ages <- sample(1:100, 6, replace = TRUE)
simulate_inhalation_rate(ages)
#> [[1]]
#> [1] 0.1625213 0.2281144 0.1786136 0.2349537 0.2106563 0.2596359
#>
# List of atomic vectors
ages <- list(
sample(1:100, 5, replace = TRUE),
sample(1:100, 3, replace = TRUE)
)
simulate_inhalation_rate(ages)
#> [[1]]
#> [1] 0.1971633 0.3031290 0.2993870 0.2280779 0.2170229
#>
#> [[2]]
#> [1] 0.3514907 0.2375111 0.2301368
#>
# Custom IR_params
IR_params <- data.frame("age" = c(0, 20, 50),
"mean" = c(0.5, 0.3, 0.2),
"sd" = c(0.1, 0.06, 0.03))
simulate_inhalation_rate(c(15, 30, 65), IR_params)
#> [[1]]
#> [1] 0.3858133 0.2594459 0.1721599
#>