search for: pair_area

Displaying 1 result from an estimated 1 matches for "pair_area".

2012 Mar 19
2
by output into data frame
...allenge=='stress') lab.samples.control<-subset(lab.samples,challenge=='control') auc_ground <- function(sub_df) { print(sub_df) auc<-sub_df[1,]*0 timedif<-c(60,10,10,10,10,10,10) for (i in 1:(nrow(sub_df)-1) ) { print(c(i,i+1)) #print(c(values[i],values[i+1])) pair_area<-(sub_df[i,]+sub_df[i+1,])*timedif[i]/2 auc<-auc+pair_area } auc } auc_stress<-by(lab.samples.stress[c('cortisol','amylase')], lab.samples.stress$subid, auc_ground, simplify=T) auc_control<-by(lab.samples.control[c('cortisol','amylase')], lab.samples...