[R] for loop

jim holtman jholtman at gmail.com
Wed Aug 5 18:24:28 CEST 2009


What do you mean by "stop"?  Is there an error message?  What are you
getting as output?  I don't see you saving or printing the output from
"Models" (whatever that is). PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

On Wed, Aug 5, 2009 at 11:37 AM, waltzmiester<cwalte03 at shepherd.edu> 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 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(Response=zample[,c(k,29)],
> Explanatory=zample[,variable_columns],
> IndependentResponse=population[,c(k,29)],
> IndependentExplanatory=population[,variable_columns])
>
> #Modeling
> Models(GLM=T, GAM=T, RF=T, GBM=T, TSS=T, KeepPredIndependent=T)
> }
>
>
> -Chris
> --
> View this message in context: http://www.nabble.com/for-loop-tp24830984p24830984.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?




More information about the R-help mailing list