[R] Does a formula object have a "left hand side"
wdunlap at tibco.com
Mon Dec 13 21:26:49 CET 2010
attr(terms(formula), "response") is 1 if
the formula has a left hand side and 0
At a lower level, you can look at
length(formula): 2 means there is no LHS,
3 means there is (any other value indicates
that someone made a call object that the
parser would not make).
Spotfire, TIBCO Software
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Erik Iverson
> Sent: Monday, December 13, 2010 12:17 PM
> To: R-help
> Subject: [R] Does a formula object have a "left hand side"
> Does anyone know of a function that will determine whether
> or not a formula object has a left hand side?
> I.e., can differentiate between
> y ~ x + z
> ~ x + z
> Perhaps I'm overlooking the obvious...
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help