[R] %in% with matrix of lists

Bert Gunter bgunter.4567 at gmail.com
Sat Jul 30 22:40:24 CEST 2016


Below.

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, Jul 30, 2016 at 11:38 AM, Neal H. Walfield <neal at walfield.org> wrote:
> On Sat, 30 Jul 2016 20:35:40 +0200,
> Jeff Newmiller wrote:
>>
>> >> [1]  TRUE FALSE  TRUE FALSE  ## NOT c(T,F,T,F)
>> >
>> >I'm not sure what you mean by NOT here.  You get the same answer as I
>> >do, as far as I can see.
>> >
>>
>> # valid R
>> T <- FALSE
>> # invalid R
>> TRUE <- FALSE
>>
>> It is much much safer and clearer to use TRUE/FALSE than T/F. So
>>
>> c( TRUE, FALSE,  TRUE, FALSE ) may not always be the same as c(T,F,T,F).
>
> I see.  I was just trying to create a minimal example.  I'll try to be
> more vigorous next time!

... and more rigorous, too, I hope. ;-)

-- Bert



>
>> I recommend reading the R Inferno to learn about this other such pitfalls.
>
> Thanks for the tip!



More information about the R-help mailing list