read.table and apply functions to a column
问题 I am reading an apache logfile using read.table and am wondering if it's somehow possible to apply a function (i.e. strptime ) while the data are being imported, instead of post-processing it. More details as requested: The column containing the date has the format: [10/Nov/2011:06:25:14 I can successfully parse it using: strptime(red[1,4],format="[%d/%b/%Y:%H:%M:%S") or as.POSIXct(strptime(red[1,4],format="[%d/%b/%Y:%H:%M:%S")) but as.POSIXct(red[1,4],format="[%d/%b/%Y:%H:%M:%S") fails.