Uses the full model syntax.

getVarFormula(formula, data = parent.frame(), intercept = FALSE)

Arguments

formula

a formula. The right-hand side selects variables; the left-hand side, if present, is used to set row names. A . on the right-hand side indicates to use all variables not in the LHS.

data

a data frame

intercept

a logical indicating whether to include the intercept in the model default: FALSE (no intercept)

Examples

getVarFormula( ~ wt + mpg, data = mtcars)
#>                        wt  mpg
#> Mazda RX4           2.620 21.0
#> Mazda RX4 Wag       2.875 21.0
#> Datsun 710          2.320 22.8
#> Hornet 4 Drive      3.215 21.4
#> Hornet Sportabout   3.440 18.7
#> Valiant             3.460 18.1
#> Duster 360          3.570 14.3
#> Merc 240D           3.190 24.4
#> Merc 230            3.150 22.8
#> Merc 280            3.440 19.2
#> Merc 280C           3.440 17.8
#> Merc 450SE          4.070 16.4
#> Merc 450SL          3.730 17.3
#> Merc 450SLC         3.780 15.2
#> Cadillac Fleetwood  5.250 10.4
#> Lincoln Continental 5.424 10.4
#> Chrysler Imperial   5.345 14.7
#> Fiat 128            2.200 32.4
#> Honda Civic         1.615 30.4
#> Toyota Corolla      1.835 33.9
#> Toyota Corona       2.465 21.5
#> Dodge Challenger    3.520 15.5
#> AMC Javelin         3.435 15.2
#> Camaro Z28          3.840 13.3
#> Pontiac Firebird    3.845 19.2
#> Fiat X1-9           1.935 27.3
#> Porsche 914-2       2.140 26.0
#> Lotus Europa        1.513 30.4
#> Ford Pantera L      3.170 15.8
#> Ferrari Dino        2.770 19.7
#> Maserati Bora       3.570 15.0
#> Volvo 142E          2.780 21.4