View source: R/statistical_simulation.r
simulate_conditionally | R Documentation |
simbase_*
objectAdd simulated values to a dataset conditionally, based on a simbase_*
object
simulate_conditionally(data, simbase, force_positive = TRUE, ...)
data |
The dataset where simulated values are added to.
The dataset has to contain at least one variable which is also included in
the |
simbase |
Basic data object for the simulation, as calculated e.g.
by |
force_positive |
If |
... |
further arguments passed to or from other methods. |
Given a simbase_*
object, this function adds simulated values to a
dataset, conditional on the values of some of the variables already
contained in the dataset.
The modified dataset data
with simulated values.
# add simulated tension data based on a simbase stored in WoodSimulatR dataset <- data.frame(E_dyn = rnorm(n = 100, mean = 12500, sd = 2200)); dataset_t <- simulate_conditionally(dataset, ws_t) # add simulated bending data dataset_be <- simulate_conditionally(dataset, ws_be)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.