chandra sutrisno
chandra sutrisno

Reputation: 531

R read csv but not got the real result

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

Answers (1)

Jason V
Jason V

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

Related Questions