Skip to content

rhs of == does not work with a list of items (PR#1172)

1 message · Brian Ripley

#
(1) There are no lists here!  You have numeric vectors, not lists.


(2) The normal vector-recycling rules apply.  It does
1 == 4, 2 == 5, 3 == 4, 4 == 5,  5 == 4, ....

Try
[1] FALSE FALSE FALSE  TRUE  TRUE FALSE FALSE FALSE FALSE FALSE


(3) For what you appear to want
[1] FALSE FALSE FALSE  TRUE  TRUE FALSE FALSE FALSE FALSE FALSE

is the way to get it.


(4) It is better to read the reference manual or a good book or post to
R-help if you don't understand what R is doing.  See the section in the
FAQ

  9.1 What is a bug?

R is a volunteer project, and bug reports take valuable time.
On Thu, 15 Nov 2001 Paul.White@dsto.defence.gov.au wrote: