[R] Unknown anomaly

Rolf Turner r.turner at auckland.ac.nz
Wed Apr 19 06:13:26 CEST 2017


On 19/04/17 13:55, Benjamin Robira wrote:
> Dear Sir,
>
> I writting to you as I am facing an irregularity in R that I do not know
> the origin. When doing a sequence from 0 to 1 by 0.02 and assigning it to
> a vector (i.e. code: a <- seq(from=0, to=1, by=0.02)) then, when I try to
> use the 36th element (and two others behave the same way) it is not
> recognized correctly. For instance a[36]==0.7, what should give TRUE,
> gives instead FALSE. However, this works fine for element 35 and 37 and
> all other elements but two.
> I do not know the reason. I restarted my R session and tried on another
> computer. This has been the same. None of my colleagues had an answer. I
> hope that you would be able to help me fix that as it must be a pretty
> straightforward error that I do not realise.
>
> I would be thankful for any help.


See FAQ 7.31.

cheers,

Rolf Turner

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-help mailing list