~x) or two-sided (e.g. x~y).R/is.one.sided.R, R/is.two.sided.R
is.one.sided.RdDetermine if an object is one- or two-sided.
Test whether a object (typically formula, call or expression) is one- (e.g.
~x) or two-sided (e.g. x~y).
is.one.sided(x, ...)
# S4 method for class 'formula'
is.one.sided(x, ...)
# S4 method for class 'call'
is.one.sided(x, ...)
# S4 method for class 'expression'
is.one.sided(x, ...)
# S4 method for class 'list'
is.one.sided(x, ...)
# S4 method for class 'ANY'
is.one.sided(x, ...)
is.two.sided(x, ...)
# S4 method for class 'formula'
is.two.sided(x, ...)
# S4 method for class 'call'
is.two.sided(x, ...)
# S4 method for class 'expression'
is.two.sided(x, ...)
# S4 method for class 'list'
is.two.sided(x, ...)
# S4 method for class 'ANY'
is.two.sided(x, ...)logical; whether x is an object is one-sided or two-sided formula.
These functions detect whether the formula is single- (unary) or double- sided. They work on formulas, expression, calls, assignments, etc.
is.single.sided and is.unary are alias for
is.single.sided. is.double.sided and is.binary are
aliases for is.two.sided.
Methods for the "<-" class exist and are not included in the usage
documentation because CRAN does not support S4 documentation for this class.
form <- y ~ x
is.one.sided(form)
#> [1] FALSE
# is.single.sided(form)
# is.unary(form)
is.two.sided(form)
#> [1] TRUE
# is.double.sided(form)
# is.binary(form)