[R] Strange julian and/or strptime

From: Kåre Edvardsen <ked_at_nilu.no>
Date: Fri, 23 May 2008 10:27:41 +0200


Hi r-helpers...

Why do I get this strange huge jump of 36524 days when changing "origin" from 1969-01-01 to 1968-12-31. It should still be close to zero! This really messes up my calculations of follow-up times in my analyses.

> julian(strptime("010169", format = "%d%m%y"),origin =
as.Date("1969-01-01"))
> Time difference of -0.04166667 days

> julian(strptime("311268", format = "%d%m%y"),origin =
as.Date("1968-12-31"))
> Time difference of 36524.96 days

Cheers,
Kare

        [[alternative HTML version deleted]]



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. Received on Fri 23 May 2008 - 08:57:37 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 23 May 2008 - 10:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive