create_options {dexisensitivity} | R Documentation |
Generate Random Options Matrix for a Given Tree
Description
Creates random options based on the RangeScale
and Probability
attributes
of tree nodes. This function is useful for generating random scenarios for simulations
or analyses.
Usage
create_options(tree, num_options = 1, seed = NULL)
Arguments
tree |
A |
num_options |
A single |
seed |
A single |
Details
The function creates a matrix of random options based on the attributes of tree nodes.
Specifically, it leverages the RangeScale
and Probability
attributes of tree nodes
to generate random options.
Value
A matrix
where rows represent tree leaves and columns represent
sampled options.
Examples
tree <- dexisensitivity::masc2
option <- create_options(tree, num_options=3, seed = 42)
[Package dexisensitivity version 1.0.0 Index]