Please read R FAQ 7.31, Why doesn't R think these numbers are equal? Sarah
On Sun, Jun 24, 2012 at 1:58 PM, Andreia Leite <andreiaheitorle...@gmail.com> wrote: > Dear list, > > I'm trying to do a loop where I should choose a cell of a data frame > comparing it with another. The code actually works for the majority of the > loop but for some reason it doesn't and I can't figure out why. > > When I tried to understand why I've noticed this: > >> dif[11] > [1] 118.8333 >> linhasUpdate[10,6] > [1] 118.8333 >> dif[11]==linhasUpdate[10,6] > [1] FALSE > > Even though the values are the same R says they aren't! This happens for > some of the values (44) and for the others (128) it works fine. > > Does anybody why is this happening or a way to fix it? I' using 2.15.0. > > Thanks a lot! > > Andreia Leite > > -- -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.