asOneSidedFormula {stats} | R Documentation |
Names, calls, expressions (first element), numeric values, and character strings are converted to one-sided formulae associated with the global environment. If the input is a formula, it must be one-sided, in which case it is returned unaltered.
asOneSidedFormula(object)
object |
a one-sided formula, name, call, expression, numeric value, or character string. |
a one-sided formula representing object
José Pinheiro and Douglas Bates
(form <- asOneSidedFormula("age"))
stopifnot(exprs = {
identical(form, asOneSidedFormula(form))
identical(form, asOneSidedFormula(as.name("age")))
identical(form, asOneSidedFormula(expression(age)))
})
asOneSidedFormula(quote(log(age)))
asOneSidedFormula(1)