I am trying to read a file with read.csv in R. Unfortunately, some of the records in the file have the following format:
16-Oct-14,6,14228,441,1035,643,921,4679,679,84,2707,370,1322,12882,"-1,346"
Is there anyway I can read the last column as numeric instead of character? To be more precise "1,346" should be read as a decimal numeric.
dem2010 <- read.csv("C:\\Users\\Utilisateur\\Desktop\\H2017\\Méthode de Prévision\\Sessions\\Session 1\\ZonalDemands_2003-2015.csv",
col.names=c("Date","Hour","TotalOntario", "Northwest","Northeast","Ottawa","East","Toronto", "Essa","Bruce","Southwest","Niagara","West", "TotalZones","diff"),
colClasses=c("character", rep("integer",13), "character"))
Thanks