Re: [R] identical() mystery

2010-03-01 Thread DarioAustralia
Thanks for your suggestions. A couple of useful functions in there I haven't heard of before. -- View this message in context: http://n4.nabble.com/identical-mystery-tp1573269p1574379.html Sent from the R help mailing list archive at Nabble.com. __ R-

Re: [R] identical() mystery

2010-03-01 Thread Duncan Murdoch
Duncan Murdoch wrote: Dario Strbenac wrote: Hello, I have 2 vectors of the same mode and the same contents but I still get FALSE. Any ideas ? reference <- c(11, 14, 16, 5, 4, 2, 0, 15, 9, 0) reference [1] 11 14 16 5 4 2 0 15 9 0 cpgDensity

Re: [R] identical() mystery

2010-03-01 Thread jim holtman
If you use 'dput' you could provide a reproducible example, plus it would probably explain what was happening. On Mon, Mar 1, 2010 at 1:24 AM, Dario Strbenac wrote: > Hello, > > I have 2 vectors of the same mode and the same contents but I still get > FALSE. Any ideas ? > >> reference <- c(11, 1

Re: [R] identical() mystery

2010-03-01 Thread Duncan Murdoch
Dario Strbenac wrote: Hello, I have 2 vectors of the same mode and the same contents but I still get FALSE. Any ideas ? reference <- c(11, 14, 16, 5, 4, 2, 0, 15, 9, 0) reference [1] 11 14 16 5 4 2 0 15 9 0 cpgDensity [1] 11 14 16 5 4 2 0 15 9 0 identical

Re: [R] identical() mystery

2010-03-01 Thread Søren Højsgaard
It might have to do with the storage.mode(): > reference <- c(11, 14, 16, 5, 4, 2, 0, 15, 9, 0) > storage.mode(reference) [1] "double" > cpgDensity <- as.integer(reference) > storage.mode(cpgDensity) [1] "integer" > identical(reference,cpgDensity) [1] FALSE regards Søren ___