This _may_ be another example of the "space" problem. Numeric fields with embedded spaces have often been converted to factors by read.table (although I confess to not having the latest version). I usually use tr -d ''\40'' < oldfile > newfile to remove the spaces and have no problem. Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
gordon.harrington@uni.edu
2001-Feb-01 22:25 UTC
[R] R 1.2.1 - read.table - factors problem...
Thanks to Jim Lemon and Thomas Lumley for instructing me by respectively re-emphasizing that NA's sometimes can be difficult to detect and showing me how to coerce from unwanted mode assignments. It should have occurred to me that functions, such as complete.cases(), that search for NA's are only reading cells, not processing the contents as do functions such as sum(). My data set was a very large one from a 30 year old archive and turned out to have a few invisible NA's whose encoding completely escaped me but which blocked processing. Gordon M. Harrington Mail: 3720 Village Place, #6308 Professor Emeritus Waterloo, IA 50702-5848 University of Northern Iowa Phone: 319-291-8535 gordon.harrington at uni.edu Fax: 319-291-8491 dryfly at aya.yale.edu 319-291-8324 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._