[R] function problem

2009-07-31 Thread RRRRRRRRRR!
I have a series of columns that need to be evaluated in various tables. I need to apply a function in the following manner somers2(name1,name2). name1 is a vector of x inputs for the function which correspond to a vector of y inputs in name2. y<-rep(c(3,4,5,8),6) z<-rep(c(23,24,25,26,27,28),4) na

Re: [R] function problem

2009-07-31 Thread RRRRRRRRRR!
uot;, "x_gbm_Dxy","x_gbm_TSS","x_gbm_Cutoff", "x_glm_AUC", "x_glm_Dxy","x_glm_TSS","x_glm_Cutoff","x_rf_AUC", "x_rf_Dxy","x_rf_TSS","x_rf_Cutoff"))) Thanks again for helping me out Steve

[R] automation question

2009-07-31 Thread RRRRRRRRRR!
I have columns in two tables that need to be compared in order to get a statistic. The function calculating the statistic is somers2. Here are the two columns I must calculate, row by row. name1 name2 1 Pred_pres_a_indpdt[,3,,] population[,23] 2 Pred_pres_b_indp

[R] another automation question

2009-07-31 Thread RRRRRRRRRR!
This code works: x<-letters[1:6] ycols<-23:28 xcols<-rep(c(3,4,5,8),each=length(ycols)) somertime<-function(i,j)somers2(Pred_pres_a_indpdt[,i,,], population[,j]) results<-mapply(somertime,xcols,ycols) How can I make variable "h" work? x<-letters[1:6] ycols<-23:28 xcols<-rep(c(3,4,5,8),each=l