search for: 24x1

Displaying 1 result from an estimated 1 matches for "24x1".

Did you mean: 2451
2013 Feb 23
1
Issue with matrices within nested for-loops
...A, 1000, 5) for(k in 1:1000) { sub<-sample(1:24,19) fit<-lm(obs~x,subset=sub) cf<-coef(fit) p <- cf[1] + cf[2] * x[-sub] resid[k,] <- obs[-sub] - p } results[i] <- mean(resid^2) } where* R2* is a 24x1 matrix with recruitment data, *comb* was a cbind() object combining two matrices and *all.mat* is the final 565x24 matrix of modeled environmental scenarios. When the script is run the first 99 scenarios are processed properly and I get readable output. At scenario 100 however, I get this message:...