Re: [R] Format ddmmYYYY in date

From: Ben Bolker <>
Date: Wed, 04 May 2011 12:57:55 +0000

smoff <simon.frey <at>> writes:

> My problem is that I have a table containing dates in the first column of 10
> years. These dates have the format ddmmYYYY at least in the csv-file. After
> importing the file using read.table() R deletes the first character if it is
> a zero.


> How do I solve this problem? Is there a way to tell R not to delete the
> first character even if it is a zero or to directly read the first column as
> date?

  See the "colClasses" argument of ?read.table ...

  (added a little bit of text to make gmane happy) mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 05 May 2011 - 06:25:12 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 Thu 05 May 2011 - 07:00:07 GMT.

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

list of date sections of archive