Skip to content
Prev 369973 / 398503 Next

For loop

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: