Skip to content

Counting confidence intervals

2 messages · arun, Jorge I Velez

#
Hi,
Jorge's method will be faster.
#system.time(res1<-sum(apply(mat2,1,function(x) x[1]<12 & x[2]>12))) #instead of 2, it should be 1
?#? user? system elapsed 
?# 0.440?? 0.000?? 0.445 

?system.time(res1<-sum(apply(mat2,1,function(x) x[1]<=12 & x[2]>12))) #
?#? user? system elapsed 
?# 0.500?? 0.000?? 0.502 
?res1
#[1] 80070


A.K.