R1,9,0beta: strange summary of Date object
On Thu, 1 Apr 2004 kjetil@entelnet.bo wrote:
Hola! Any explanation of the following:
summary(as.Date(rep(NA,20)))
Min. 1st Qu. Median Mean 3rd Qu.
Max.
NA NA NA NA NA
NA
NA's
"1970-01-21"
Where does this 1970 date come from?
By coercion. Same thing happens with POSIXct. It could be improved, but seems to have caused no real problems in the POSIXct case.
Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595