[R] as.Date

Philipp Pagel p.pagel at wzw.tum.de
Tue Feb 8 17:51:51 CET 2011


> I have a strange behavior of the as.Date() function. For example:
> as.Date(36525, origin="1900-01-01'")
> 
> I would expect to get 2000-01-01. But R gives me

That's almost exactly what I get with R 2.11.1, LINUX (minus the
one-day differnce which is probably correct, too lazy to count leap
years...):

> as.Date(36525, origin="1900-01-01'")
[1] "2000-01-02"

At first I thought the excess single quote maight be causingyour
problem, but it doesn't for me.

Maybe you need to upgrade R? Possibly it's an already fixed issue?

cu
	Philipp


-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/



More information about the R-help mailing list