On Sat, Jun 5, 2010 at 2:01 PM, RICHARD M. HEIBERGER wrote:
> The "/" is used for nesting and is defined by
> A/B == A + (B %in% A)
>
> thus
> (a+b)/c == (a+b) + c %in% (a+b) == a + b + a:b:c
...I guess I could then ask why %in% is defined that way, but actually
this rephrasing somehow helped me
The "/" is used for nesting and is defined by
A/B == A + (B %in% A)
thus
(a+b)/c == (a+b) + c %in% (a+b) == a + b + a:b:c
Rich
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-he
This isn't at all an urgent practical question, but recently while
exploring the details of how R formulas are interpreted, I learned of
this funny special case for how / interacts with +. In all of the
following cases, the multiplication-like operator simply distributes
over addition:
(a + b):c
3 matches
Mail list logo