View source: R/specification.R
| read_definitions | R Documentation |
Read variable definitions from a CSV file
read_definitions(file)
file |
Path to a CSV file containing |
A simulab_spec base data.frame.
file <- tempfile(fileext = ".csv")
utils::write.csv(
data.frame(
variable = c("baseline", "outcome"),
distribution = c("normal", "normal"),
formula = c("0", "0.5 * baseline"),
variance = c("1", "1"),
link = c("identity", "identity")
),
file, row.names = FALSE
)
specification <- read_definitions(file)
specification
head(simulate_study(n = 50, specification = specification, seed = 1))
unlink(file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.