The function read.csv
in R allows you to pass in colClasses in order to speed up the parsing process. One of the classes that you are allowed to pass in is Date
. My data file has a date column in the %m/%d/%Y
format - normally I read this in as a character vector using read.csv
, then after that is complete I convert the column using as.Date(foo, "%m/%d/%Y")
.
Is there a way to pass a custom date format to read.csv
so the date conversion can be done inside read.csv
?