Skip to content

rhs of == does not work with a list of items. should it ? (PR#1173)

1 message · Uwe Ligges

#
Paul.White@dsto.defence.gov.au wrote:
That's not a bug!
R extends the vector 4:5 to have the same length as 1:10 and compares
these two vectors:

4 1
5 2
4 3
5 4
4 5
5 6
4 7
5 8
4 9
5 10

So there is no position with "4:5 == 1:10"!
Test it with: 2:10 == 4:5.

What you want is  (I guess):
 1:10 %in% 4:5

Uwe Ligges

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._