View source: R/build_allowed.R
| build_allowed_matrix | R Documentation |
Creates a symmetric logical matrix indicating which pairs of predictors are allowed to interact. By default, all interactions are allowed.
build_allowed_matrix(variable_names, default = TRUE)
variable_names |
Character vector of predictor variable names. |
default |
Logical. Default value for all entries. Default is |
A symmetric logical matrix with variable_names as both row and
column names.
mat <- build_allowed_matrix(c("sqft", "bedrooms", "pool"))
mat["sqft", "pool"] <- FALSE
mat["pool", "sqft"] <- FALSE
mat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.