Skip to content
Prev 390987 / 398506 Next

Is there a Truth Table Generator in R?

...
tt$truth <- tt$A & tt$B & tt$C
to evaluate the outcome of expand.grid.

or, as I said,
tt$truth <- apply(tt,1, all)
which works for any number of columns in tt.


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Mar 12, 2022 at 2:02 PM Ebert,Timothy Aaron <tebert at ufl.edu> wrote:
Message-ID: <CAGxFJbQFz0-rzcd+vyE+qMsjmNFCtUxsq3u7FKVJKk1rmmWw6g@mail.gmail.com>
In-Reply-To: <BN6PR2201MB1553E34B1D13F555C1680B22CF0D9@BN6PR2201MB1553.namprd22.prod.outlook.com>