Skip to contents

Simulate inhalation rates

Usage

simulate_inhalation_rate(x, IR_params = NULL)

Arguments

x

atomic vector or list of atomic vectors containing ages.

IR_params

(optional) data frame with columns "age", "mean" and "sd". See details for more information.

Value

List of atomic vectors containing 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.1429835 0.1322055 0.1924417 0.2513578 0.2561258 0.2333317
#> 

# 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.1876381        NA 0.1385313 0.2020582 0.3040501
#> 
#> [[2]]
#> [1] 0.2185192 0.2032681 0.3593735
#> 

# 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.4343494 0.2598280 0.1856423
#>