get variable names in a formula and data
Examples
gzma = sf::read_sf(system.file('extdata/gzma.gpkg',package = 'sdsfun'))
formula_varname(PS_Score ~ EL_Score + OH_Score, gzma)
#> $yname
#> [1] "PS_Score"
#>
#> $xname
#> [1] "EL_Score" "OH_Score"
#>
formula_varname(PS_Score ~ ., gzma)
#> $yname
#> [1] "PS_Score"
#>
#> $xname
#> [1] "EL_Score" "OH_Score" "IL_Score"
#>