Message-ID: <01ff01c116c2$f6952300$c5093586@STEVENS>
Date: 2001-07-27T17:38:35Z
From: Martin Henry H. Stevens
Subject: converting among modes
Windows 2000, R 1.3.0
I have been given a data set (ASCII tab delimited) in which many variables
that are supposed to be numeric actually contain characters. I would be
happy to have those character entries disappear and become NA.
When I use read.table and then attempt to convert these using as.numeric(),
of course it doesn't work, and I get the ASCII? representation? maybe? When
I use scan() and specify the data type (what=...), I get an error message
saying that I have character data in the numeric variable.
Any ideas are appreciated.
Thank you,
Henry
*****************************
Martin Henry H. Stevens
HStevens at muohio.edu
tel: (513) 529 - 4206
FAX: (513) 529 - 4243
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._