On Wed, Sep 30, 2009 at 8:40 PM, Michael Knudsen <micknud...@gmail.com> wrote:
>> a = seq(0.1,0.9,by=0.1) >> a > [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 >> a[1] == 0.1 > [1] TRUE >> a[2] == 0.2 > [1] TRUE >> a[3] == 0.3 > [1] FALSE A friend of mine just pointed out a possible solution: > a=seq(0.1,0.9,by=0.1) > a = seq(0.1,0.9,by=0.1) > a[3]==0.3 [1] FALSE > all.equal(a[3],0.3) [1] TRUE The all.equal function checks if two objects are "nearly" equal. -- Michael Knudsen micknud...@gmail.com http://sites.google.com/site/micknudsen/ ______________________________________________ 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.