Rolf Turner wrote: > > I solved the problem by putting in a colClasses argument in my > call to read.csv(). But I really think that the read functions > are being too clever by half here. If field entries are surrounded > by quotes, shouldn't they be left as character? Even if they are > all F's and T's? >
It has been my experience that fields surrounded by quotes are interpreted as factors unless the stringsAsFactors switch has been set to false. So it seems the default behavior of read.table is to be clever. Annoying as these behaviors are, changing them would probably break existing code that expects the function to execute the way it does. -Charlie -- View this message in context: http://n4.nabble.com/A-slight-trap-in-read-table-read-csv-tp1573007p1573018.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.