Maha,

I'm no pro at this, but I think this will work for you... my additions or
changes are bold italics, I struggled forever to do the same kind of thing
and then winced when it turned out to be relatively simple. Hopefully
someone else will chime in if this is a bad way to do it.

ts.m.dmi <- matrix(c(1:20), 4, 5)
ts.m.soi <- matrix(c(21:40), 4, 5)
ts.m.pe <- matrix(c(21:40), 4, 5)

factors <- c("ts.m.dmi", "ts.m.soi")
for (j in 0:1){
y <- factors[j+1]
*ydata<- get(y)*

for (i in 1:5){

cor.pe.y <- cor(ts.m.pe[,2], *ydata[,1]*)
ct.tst <- cor.test(ts.m.pe[,2], *ydata[,1]*)
}
}
____________________
Elizabeth Crisfield
Research Assistant
Geography Department
Penn State University
phone 814-777-3395
eac16@psu.edu
www.elizabethcrisfield.com

	[[alternative HTML version deleted]]

