Description Usage Arguments Value Author(s) Examples
View source: R/restrict_by_condition.R
Restrict scenarios based on allowed scenarios
1 2 3 4 5 | restrict_by_condition(
sims,
allowed_scenarios,
restriction_var = c("scenario", "sample")
)
|
sims |
A data.table from |
allowed_scenarios |
A data.table of allowed scenarios. Must include a scenario and sample variable. |
restriction_var |
Character vector of variables to use to restrict scenarios. Defaults to "scenario" and "sample". |
A data frame of scenarios restricted by the allowed scenarios
Sam Abbott
1 2 3 4 5 6 7 8 9 | ## Example
sims <- data.table::data.table(scenario = 1:10, sample = 1:10, value = 1:10)
allowed_scenarios <- data.table::data.table(scenario = c(1,4,6), sample = c(1, 4, 6))
restrict_by_condition(sims, allowed_scenarios)
## Code
restrict_by_condition
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.