Nüzhet Dalfes
2008-Jan-01 21:59 UTC
[R] How to convert day-month-year to Julian data number?
Hi, Is there a package for converting day-month-year type date to julian day number (JDN)? I looked around and I couldn't find any (I am pretty new to R...) Thanks and happy New Year to everybody! H. N?zhet Dalfes Professor, Istanbul Technical University Eurasia Institute of Earth Sciences +90 (532) 206-1308 [dalfes at itu.edu.tr]
jim holtman
2008-Jan-01 22:07 UTC
[R] How to convert day-month-year to Julian data number?
Is this what you want?> x <- c('5/5/2007', '12/31/2007') > # convert to day of year (Julian date) -- use POSIXlt > strptime(x, "%m/%d/%Y")$yday+1[1] 125 365 On Jan 1, 2008 4:59 PM, N?zhet Dalfes <dalfes at gmail.com> wrote:> Hi, > > Is there a package for converting day-month-year type date to julian > day number (JDN)? I looked around and I couldn't find any (I am pretty > new to R...) > > Thanks and happy New Year to everybody! > > > > > H. N?zhet Dalfes > > Professor, > Istanbul Technical University > Eurasia Institute of Earth Sciences > +90 (532) 206-1308 > [dalfes at itu.edu.tr] > > ______________________________________________ > R-help at 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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve?