Re: [R] - german date format

From: Uwe Ligges <>
Date: Wed, 09 Jan 2008 15:38:02 +0100

Konga wrote:
> Hi,
> I have a data.frame with the following variable:
> $ xx :Factor w/ 66 levels "01.02.2006","01.03.2006",..: 3 3 3 3 3 3 3 3 3
> now I´d like use "" on it - if I comprehend the instructions on
> it should work like this:
>, "%d.%m.%Y") - but it doesn´t...

At least as.Date() works for me for *one* of your factor labels:

as.Date(factor("01.02.2006"), "%d.%m.%Y") [1] "2006-02-01"

So, please read the posting guide before posting and learn that you should tell us:

What is the error message? Which R version is this? What are all the labels (in order to reproduce your error)?

in order to get better help.

Uwe Ligges

> the survival Package ist loaded - is there a problem with the german format?
> Or did I understand something wrong?
> Much better than tranforming the format from to data would be to import it
> in the right format.
> Is there a parameter for read.csv to get it as a date from the beginning?
> mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 09 Jan 2008 - 14:43:20 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 Wed 09 Jan 2008 - 16:30:06 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive