View source: R/designs_helpers.R
laws_index | R Documentation |
Index laws list according to desired class of law. This is an internal function which searches the laws of desired class in the lsit of laws. The classes should be obtained separately with a 'class_laws' function.
laws_index(experimental_design, type = "rand")
experimental_design |
Input object to test |
type |
Type (class) of the laws to be searched for. Multiple classes may be specified at the same time. This is an internal function which simplifies the treatment of different data generation procedures. Default value is "rand". |
Logic
# Create alternatives alt1 <- alternative$new() alt1$add_attributes(Quality = runif(min = 0, max = 1), Price = rnorm(mean = 5)) alt2 <- alternative$new() alt2$add_attributes(Size = c(0, 1), Price = rnorm(mean = 6)) # Regroup alternatives into design edesign <- experimental_design$new(alternatives = list(alt1, alt2)) # Get index list index <- laws_index(edesign, type = c("rand"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.