This idea substract 1 for the all column which is not what i want. We know that the leap years have 366 days. I don't need to change anything on them
the non-leap years have 365 days. This is what i want to change to be 366 days rather than 365 days. On Thu, Oct 9, 2014 at 1:07 PM, Jim Lemon <j...@bitwrit.com.au> wrote: > 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 > > -- Frederic Ntirenganya Maseno University, Kenya. Mobile:(+254)718492836 Email: fr...@aims.ac.za https://sites.google.com/a/aims.ac.za/fredo/ [[alternative HTML version deleted]] ______________________________________________ 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.