I'm trying to read a file into R using data.table
/ fread
. Some of the fields have leading zeros and I just want to read the data in as characters and manually fix them. However I can't figure out how to convey this to fread
. I'm trying this and it's assigning char, num, etc types as it normally would :
prop1 <- data.frame(fread("C:\\myFile.csv"), stringsAsFactors = F, colClasses = c(rep('character',58)))
What am I missing?