Description Usage Arguments Value Examples
View source: R/add_variables.R
While different analyses use different types of variables, in general they can be classified as in the 'y' or 'x' position of a statistical equation. They can further be classified as covariates and as an interaction term.
1 2 3 4 5 | add_variables(
data,
type = c("yvars", "xvars", "covariates", "interaction"),
variables
)
|
data |
The blueprint data object. |
type |
The variable type, i.e. where it is located on the equation (y position, x, as a covariate, etc.) |
variables |
Variables to use for the type specified |
Adds variables to the blueprint
1 2 3 4 5 6 7 8 9 | library(magrittr)
ds <- design(iris, 'cor') %>%
add_settings()
add_variables(ds, 'xvar', 'Sepal.Length')
add_variables(ds, 'yvar', 'Petal.Length')
ds <- design(iris, 't.test')
ds <- add_variables(ds, 'yvar', c('Sepal.Length', 'Sepal.Width'))
ds <- add_variables(ds, 'xvar', 'Petal.Length')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.