Skip to content
Prev 305408 / 398506 Next

remove all terms with interaction factor in formula

On Sep 13, 2012, at 11:00 AM, Bert Gunter wrote:

            
That seemed pretty clear and obvious, but I started wondering how to tell the machine to do it. Here is another idea:
[1] "a"     "b"     "c"     "d"     "a:b"   "a:c"   "a:d"   "b:d"   "c:d"   "a:b:d" "a:c:d"

(Although I realize it's no longer a formula and might need to be reassembled with `paste` and  `as.formula`.)