Description Usage Arguments Value Examples
Set balance classes
1 2 3 4 5 6 7 | balance_groups_by(x, ...)
## Default S3 method:
balance_groups_by(x, ...)
## S3 method for class 'goldrake'
balance_groups_by(x, ..., force = FALSE)
|
x |
a |
... |
variables to balance by |
force |
(lgl, default = TRUE) if TRUE, overwrite possible balancing variables already set. |
invisibly, the updated version of x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | goldrake(mtcars) %>%
balance_groups_by(vs)
goldrake(mtcars) %>%
balance_groups_by(vs, cyl)
goldrake(mtcars) %>%
balance_groups_by(vs, cyl)
goldrake(mtcars) %>%
balance_groups_by(vs) %>%
balance_groups_by(vs, cyl, force = TRUE)
## Not run:
# an error
goldrake(mtcars) %>%
balance_groups_by(foo)
goldrake(mtcars) %>%
balance_groups_by(vs) %>%
balance_groups_by(vs, cyl)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.