Displaying 1 result from an estimated 1 matches for "cccma207101".
2010 Feb 01
1
Isolating a column within a loop
...el, "_mean_",index$year[i], index$month[i], sep=''),
????????????? mean(get(paste(model, index$year[i], index$month[i], "[,3]", sep=''))))
???????? }
Error in get(paste(model, index$year[i], index$month[i], "[,3]", sep = "")) :
? object 'cccma207101[,3]' not found
The error message I'm getting is strange, because this object does exist:
str(cccma207101[,3])
?num [1:61538] 0.687 2.661 0 0 0 ...
If I leave the "[,3]" out of the loop, the code seems to work fine - so I'm isolating this as the cause of the problem for now....