[R] Changing date format
Jim Lemon
jim at bitwrit.com.au
Thu Oct 9 12:07:57 CEST 2014
On Thu, 9 Oct 2014 12:30:57 PM Frederic Ntirenganya wrote:
> Hi Lemon,
>
> I am using the code you sent. It's correct for the leap years.
> What I want to do is to have both leap and no-leap years to have 366
days.
> that means the 1st March is day 61 of each year.
> This will help me to link it with Instat for climatic data analysis.
>
Are you sure that the Start and End day of year numbers haven't
already been corrected for leap years? If not, you can correct both for all
years like this:
Samaru$Start<-Samaru$Start - Samaru$Start > 60)
Samaru$End<-Samaru$End - Samaru$End > 60)
as you don't want to shift the dates before Feb 29.
Jim
More information about the R-help
mailing list