View source: R/data_prep_utils.R
| design_matrix | R Documentation | 
This function takes a dataset and strings with variable names as input and creates interactions and polynomials
design_matrix(data, int = NULL, int_d = 2, poly = NULL, poly_d = 2, log = NULL)
data | 
 Matrix with the main variables.  | 
int | 
 Vector of strings with the variables to be interacted.  | 
int_d | 
 Degree of interactions created. Default is 2.  | 
poly | 
 Vector of strings with the variables for which polynomials should be created.  | 
poly_d | 
 Degree of polynomials to be created. Default is 2.  | 
log | 
 Vector of strings with the variables for which the logged versions should be added.  | 
Matrix including the main variables and the newly generated ones.#'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.