Skip to content
Prev 138331 / 398506 Next

help for the first poster- a simple question

Thanks for all response. Here  is  more closer to my question,
p<-0.05

f<-0.05

ld<-sqrt(f* (1 - f) * p * (1 - p))

D <- (p * (1 - f) - ld)/p

d <- ((1 - p) * f - ld)/(1 - p)

haplo<-data.frame(D,d)
D             d
1 -1.387779e-16 -7.304099e-18

cond1<-pmin(haplo[,1],haplo[,2])

haplo[cond1>=0,]

But  the  program cannot get  right one, because


 -1.387779e-16>=0 is FALSE

 -7.304099e-18>=0 is FALSE



Thank you!

xj.


----- Original Message ----- 
From: "Gavin Simpson" <gavin.simpson at ucl.ac.uk>
To: "Xuejun Qin" <xjq at chg.duhs.duke.edu>
Cc: <r-help at r-project.org>
Sent: Monday, March 03, 2008 12:57 PM
Subject: Re: [R] help for the first poster- a simple question