Re: [R] for loop

2009-08-05 Thread waltzmiester
Um I still followed the guidelines... David Winsemius wrote: > > > On Aug 5, 2009, at 1:22 PM, waltzmiester wrote: > >> >> Jim >> >> Settle down, just because you can't understand my post doesn't mean >> I didn't >> follow the

Re: [R] for loop

2009-08-05 Thread waltzmiester
The Initial.State function is the setup for Models. So Models will apply the function to k columns in Initial.State. It will only work for the first element in vector col however, and will not loop the function through all elements in vector col -C waltzmiester wrote: > > I am try

Re: [R] for loop

2009-08-05 Thread waltzmiester
t; and provide commented, minimal, self-contained, reproducible code. > > On Wed, Aug 5, 2009 at 11:37 AM, waltzmiester > wrote: >> >> I am trying to get the function "Models" to work each time there is an >> instance of k. This code will stop after the f

[R] for loop

2009-08-05 Thread waltzmiester
I am trying to get the function "Models" to work each time there is an instance of k. This code will stop after the first model is complete. I need it to come back and pass the next value of c into the "Initial.State" function. any ideas? col<-c(23:28) #Setup for(k in col){ Initial.State(Respon

Re: [R] automate multiple object creation

2009-07-31 Thread waltzmiester
nction(i,j){ for(i in name1){ for(j in name2){ somers2(i,j) }}} rank(name1,name2) waltzmiester wrote: > > I believe this is a little bit closer: > > rank<-function(i,j){ > > for(i in name1){ > for(j in name2){ > somers2(i,j) > }}} > > ran

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 >

[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] for loop for file names

2009-07-30 Thread waltzmiester
dpdt',sep="") > > lapply(files, load) > > > HTH, > > baptiste > 2009/7/30 waltzmiester : >> >> I am trying to load binary files in the following fashion >> >> load("pred/Pred_pres_a_indpdt") >> load("pred/Pred_pres_b_indpdt

[R] for loop for file names

2009-07-30 Thread waltzmiester
I am trying to load binary files in the following fashion load("pred/Pred_pres_a_indpdt") load("pred/Pred_pres_b_indpdt") load("pred/Pred_pres_c_indpdt") load("pred/Pred_pres_d_indpdt") load("pred/Pred_pres_e_indpdt") load("pred/Pred_pres_f_indpdt") but I would like to set up a for loop to repla