Reputation: 531
I try to read csv file but the outcome not exactly same with the data source. Say like date field contains 05/01/15, I got 5/1/2015. How to deal with this so whatever I got is same with the data source ?
Upvotes: 0
Views: 37
Reputation: 1147
You can provide the read.table (or other read.[...]
) with the colClasses arguments and indicate you want this column read as character. See ?read.table
for more details.
From this helpfile:
Note: to suppress all conversions including those of numeric columns, set colClasses = "character".
Upvotes: 1