[R] Logical operator in R

li li hannah.hlx at gmail.com
Fri Jan 22 16:46:40 CET 2016

Hi all,
  I encountered the following strange phenomenon.
For some reason, the obs_p[1] and res1$st_p[89] have
the same value but when I run "==", it returns FALSE.
Can anyone help give some explanation on this?
  Thanks very much!

> obs_p[1]
[1] 0.002201438
> res1$st_p[89]
[1] 0.002201438
> res1$st_p[89]==obs_p[1]
> res1$st_p[89]<obs_p[1]
> res1$st_p[89]>obs_p[1]
[1] TRUE

	[[alternative HTML version deleted]]

More information about the R-help mailing list