[R] automate multiple object creation

2009-07-31 Thread waltzmiester
I appreciate all the help I have received from this list and also not being flamed because I am new to R. Many of my problems are in automation so far. I am trying to create multiple objects that are outputs of functions. Here are the tasks: aGAM<-somers2(Pred_pres_a_indpdt[,3,,],population[,23]

Re: [R] automate multiple object creation

2009-07-31 Thread waltzmiester
I believe this is a little bit closer: rank<-function(i,j){ for(i in name1){ for(j in name2){ somers2(i,j) }}} rank(name1,name2) bu still not there waltzmiester wrote: > > I appreciate all the help I have received from this list and also not > being flamed because

Re: [R] automate multiple object creation

2009-07-31 Thread waltzmiester
x<-c("a","b","c","d","e","f") y<-rep(c(3,4,5,8),6) z<-rep(c(23,24,25,26,27,28),6) name1<-sprintf("Pred_pres_%s_indpdt[,%s,,]",x,y) name2<-sprintf("population[,%s]",z) rank<-function(i,j){ for(i in name1){ for(j in name2){ somers2(i,j) }}} rank(name1,name2) waltzmie