[R] For loop

Rui Barradas ruipbarradas at sapo.pt
Thu Jun 22 19:15:42 CEST 2017


Hello,

Without correcting your code, it's obvious that the expressions like 
leafbiom97$Date == "i" and all others with"i" and "i - 1" are wrong.
leafbiom97$Date is of class Date, not character. And, besides,
for(i in ...) makes of i a numeric variable that has nothing to do with 
"i". This "i" will remain the character string "i" for all iterations of 
the loop.

Hope this helps,

Rui Barradas

Em 22-06-2017 17:50, Ahmed Attia escreveu:
> leafbiom97$Date == "i"



More information about the R-help mailing list