[R] Inconsistency using seq
Sarah Goslee
sarah.goslee at gmail.com
Mon Jun 18 22:51:45 CEST 2012
Please read R FAQ 7.31. The problem is with your computer (and
everyone else's), and has nothing to do with seq().
On Mon, Jun 18, 2012 at 3:58 PM, hamoreno <hamoreno at asu.edu> wrote:
> Hi all,
>
> Is there any problem of precision when using seq?. For example:
>
> x<- seq(0,4,0.1)
> x[4]=0.3
>
> BUT:
>
> x[4]-0.3=5.551115e-17
>
> It means when I use this condition within an if clause, it does not find
> values with 0.3 for x[4] as it is not precisely 0.3.
> Is there any bug in seq() ?
>
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-help
mailing list