[R] Odp: Loop overwrite and data output problems

RCulloch ross.culloch at dur.ac.uk
Mon Mar 1 16:36:27 CET 2010


Hi Petr,

Thanks again for trying again with these data, I really appreciate it.

Your script works perfectly, but the problem I'm having is how to store the
model results so after your script I would do: 

		m1.R<-glm(cbind(res$BEH_T, res$BEH_F) ~ res$SITE + res$YEAR +
res$PRECIP_MM_DAY + res$PUP_AGE_EST + res$MO_AIR_TEMP, family="binomial")
		mod<-dredge(m1.R)

where mod is a list not a vector. 

So your example has 10 iterations of the loop so there should therefore be
10 different mod[1,] that I want to store and that is what I can't work out
how to do, for example I can do this:

			if (i>=1) print (mod[1,]) else print ("NO")}

And I will get a print of each of the 10 model outputs that I want, but I
want to store these somewhere. I did try to adjust your value <- matrix
section of the script but had no luck.

I hope this is a little clearer?

Thank you again for your help, I really appreciate it!

Ross


-- 
View this message in context: http://n4.nabble.com/Loop-overwrite-and-data-output-problems-tp1570593p1573703.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list