Message-ID: <594BFB3E.2030909@sapo.pt>
Date: 2017-06-22T17:15:42Z
From: Rui Barradas
Subject: For loop
In-Reply-To: <CAG6S0Om2_FQyOJ-7L+aSqiUbT0-inm-opiCEVFY3NaugPoFYXg@mail.gmail.com>
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"