[R] a very simple question

David Winsemius dwinsemius at comcast.net
Mon Mar 19 06:59:02 CET 2012


On Mar 18, 2012, at 4:43 PM, Dajiang Liu wrote:

>
> Dear All,
> I have a seemingly very simple question, but I just cannot figure  
> out the answer. I attempted to run the  
> following:a=0.1*(1:9);which(a==0.3);it returns integer(0). But  
> obviously, the third element of a is equal to 0.3.
> I must have missed something. Can someone kindly explain why? Thanks  
> a lot.

It has already been explained on this list ... "frequently" in FAQt.

Locate the FAQ and search for a question about why R doesn't think two  
numbers are equal. The FAQ should be part of a standard instalL on the  
main help page.


> Regards,Dajiang
> 		 	   		
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list