| augment_factorial | R Documentation |
Add factorial conditions to existing rows
augment_factorial(data, factors, coding = c("dummy", "effect", "level"))
data |
Input base |
factors |
Named numeric vector of whole numbers giving the number of levels of each factor. Every entry must be at least 2. |
coding |
Factor coding passed to |
A simulab_sim base data.frame with one row per row of data
crossed with every design condition, so nrow(data) * prod(factors) rows:
the columns of data followed by one column per factor. The design
component holds the distinct conditions, one row each.
data <- data.frame(id = 1:12)
result <- augment_factorial(data, factors = c(dose = 3L, timing = 2L))
head(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.