I have a .CSV file containing numeric data, i.e., "2.0", "3.0", etc. for 36 different observations of two different dependent variables. When I use read.csv to import this file, I am losing the trailing zeros, i.e., the values are reformatted to "1", "2", "3", etc. To circumvent this, I have changed my code as follows:
(file = "Ant_Data.csv",header = TRUE, colClasses = c("character", "character", "character", "character"))
This worked in that it preserves the trailing zeroes. But sadly, it throws a snag in my script because, since these are now being read as character values, I can no longer perform any numerical analyses. Is there a way to preserve my trailing zeroes AND numerical fatting when importing my .CSV file into R?