Use this when you want to compare x by group.
Arguments
- x
The response variable. A bare name,
c()of bare names, a tidyselect helper (requiresdata), orI(expr)for inline data.- group
The grouping variable. Same rules as
x.
Examples
# bare names (resolved from environment or data)
x_by(extra, group)
#> -- Model Definition ------------------------------------------------------------
#>
#> Model ID : x_by
#> Args : extra | group
# inline data
x_by(I(rnorm(30)), I(rep(c("a", "b"), each = 15)))
#> -- Model Definition ------------------------------------------------------------
#>
#> Model ID : x_by
#> Args : <inline> | <inline>
# named inline
x_by(I(score = rnorm(30)), I(grp = rep(c("a", "b"), each = 15)))
#> -- Model Definition ------------------------------------------------------------
#>
#> Model ID : x_by
#> Args : <inline> | <inline>