| augment_density | R Documentation |
Add an empirical-density variable to existing data
augment_density(
data,
values,
variable,
use_limits = FALSE,
keep_missing = FALSE,
seed = NULL
)
data |
Destination base |
values |
Numeric source values, of which at least two must be present and distinct. |
variable |
Name of the new variable. |
use_limits, keep_missing, seed |
Density-simulation arguments, as in
|
A simulab_sim base data.frame with the density variable added.
values <- stats::rnorm(200, mean = 5, sd = 2)
data <- data.frame(id = 1:50)
result <- augment_density(data, values = values, variable = "score", seed = 1)
head(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.