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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to