Skip to content
Prev 323921 / 398503 Next

numeric not equal its value

Jannis,

Not strange.  Try with numbers that can be exactly represented in binary 
(that's what computers use), e.g.,

a<-seq(5,70,by=5)
b<-15
a==b

or fractions,

a<-seq(1/32,14/32,by=1/32)
b<-3/32
a==b

Most decimal fractions cannot be represented exactly although a bit of 
magic will display them as if they are.

A little digging into the r-help archives will find further explanation.

Clint

Clint Bowman			INTERNET:	clint at ecy.wa.gov
Air Quality Modeler		INTERNET:	clint at math.utah.edu
Department of Ecology		VOICE:		(360) 407-6815
PO Box 47600			FAX:		(360) 407-7534
Olympia, WA 98504-7600

         USPS:           PO Box 47600, Olympia, WA 98504-7600
         Parcels:        300 Desmond Drive, Lacey, WA 98503-1274
On Mon, 20 May 2013, Jannis wrote: