search for: 11spp

Displaying 1 result from an estimated 1 matches for "11spp".

Did you mean: 11sp3
2013 Mar 26
2
Problem with nested for-loop
...delim("predictset_forR.txt",header=T) j1data=j1data[,2:4] its=c(rep(1:10000,each=11)) j1data=cbind(its,j1data) #set up a matrix full of zeros "lnbm" where prediction results are placed #set up for loop that first loops over iteration, then species #(total iterations=10000it/spp*11spp=110000 iterations)and then over each tree #(total # of trees=259) niter=10000 nspp=11 ntrees=259 lnbm=matrix(0,10000,259) k=numeric() for (i in 1:ntrees) { for (j in 1:nspp) { for (m in 1:niter) { k=((j1data$its[m]-1)*1000)+(j1data$spp[j]) #print(k) lnbm[m,i]=j1data$b0[k]+j1data$b1[k]*predic...