[R] Format ddmmYYYY in date

Ben Bolker bbolker at gmail.com
Wed May 4 14:57:55 CEST 2011


smoff <simon.frey <at> boku.ac.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.

 [snip]

> 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)



More information about the R-help mailing list