is_one_predictor_formula: Checks whether the formula has a single predictor (which is...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Checks whether the formula has a single predictor (which is not a dot)

Usage

1

Arguments

form

A formula

Value

TRUE if formula has a single predictor, and that it is not a dot. FALSE otherwise.

Examples

1
2
3
4
5
6
## Not run: 
is_one_predictor_formula(Y ~ X + Z) # returns: FALSE
is_one_predictor_formula(Y ~ .) # returns: FALSE
is_one_predictor_formula(Y ~ X) # returns: TRUE

## End(Not run)

gwb/RGOB documentation built on May 14, 2021, 7:39 a.m.