search for: treemea

Displaying 1 result from an estimated 1 matches for "treemea".

Did you mean: treemeas
2012 Mar 13
1
Error " subscript out of bounds"
...ve a datafile with 37313 records and each record has 5 different measurements on the same variables. The format looks like this: treeID, VIG0, VIG1, VIG2, VIG3, VIG4 I was trying to convert the one row record to 5 rows record with format like this (treeID, MEASUREMENT, VIGOR). My code like this:   treeMeas<-matrix(data=0,nrow=(length(tree1$indivTree)*5), ncol=3) colnames(treeMeas)<-c("indivTree", "meas", "vigor") for(i in 1:length(tree1$indivTree)) {   treeMeas[(i-1)*5+1:(i*5),1]<-tree1$indivTree[i]   treeMeas[(i-1)*5+1:(i*5),2]<-c(0:4)   treeMeas[(i-1)*5+1...