Hello,
I am trying to use the projection.matrix( ) function and am following the example given. I have my data formatted very similar to the test.census example. > str(AsMi05mat) `data.frame': 1854 obs. of 6 variables: $ Tag : num 501 502 503 504 505 506 507 508 509 510 ... $ Year : int 1995 1995 1995 1995 1995 1995 1995 1995 1995 1995 ... $ Length : num 34 37 11 24 7 44 4 7 12 20 ... $ Flowering: int 1 1 0 1 0 1 0 0 0 1 ... $ Fruits : int 22 22 0 89 0 15 0 0 0 0 ... $ Stage : Factor w/ 5 levels "","Dead","Dormant",..: 4 4 5 4 5 4 5 5 5 4 ... The example data includes three years but only shows how to create a matrix from year 1 to 2. I have 13 years of data and would like to automate creating all matrices for each pair of years. I tried a for( ) loop but don't know how to assign new names for each matrix so end up with only the final comparison (2005 to 2006). I assume an apply( ) function is the way to go but can't see how to do it. Thanks for any help! Michelle [[alternative HTML version deleted]] ______________________________________________ R-help@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.