Displaying 1 result from an estimated 1 matches for "gtru".
Did you mean:
gru
2010 Oct 08
3
Efficiency Question - Nested lapply or nested for loop
...Nested Loop Approach
for (row in (1:nrow(data))) {
for (i in (0:(nind-1))) {
Gmax = which.max(c( data[[paste("G_hat_0_",i,sep="")]][row],
data[[paste("G_hat_1_",i,sep="")]][row],
data[[paste("G_hat_2_",i,sep="")]][row] ))
Gtru = data[[paste("G_",i,sep="")]][row] + 1 # add 1 to match Gmax range
cmat[Gmax,Gtru] = cmat[Gmax,Gtru] + 1
}
}
## APPROACH 2: Nested lapply ####
# This routine finds the geno w/ highest prob from the erg.avgs.
# and compares it to the true geno. Result is tallied by
# in...