[Rd] "NA" vs. NA

Kevin R. Coombes kevin.r.coombes at gmail.com
Thu Apr 5 16:04:49 CEST 2012

Change the "na.strings" argument to read.table or read.csv when reading 
in the file.  By default, na.strings="NA".  If you do something like

countryCodes <- read.csv("mySourceFile.csv", na.strings="")

then your problem will go away.

On 4/5/2012 7:26 AM, Adrian Dusa wrote:
> On Thu, Apr 5, 2012 at 14:49, Duncan Murdoch<murdoch.duncan at gmail.com>  wrote:
>> On 12-04-05 7:27 AM, Adrian Dusa wrote:
>>> [...]
>> You still haven't explained what you are doing to cause the problem, so I'll
>> guess that you have this file in your data directory of the package, in
>> tab-delimited form.
>> Just store it in some other form, e.g. as a binary object to be loaded.
> Indeed, this is exactly what I did (tab-delimited file in the data
> directory) and yes, this solves the issue.
> Thanks very much,
> Adrian

More information about the R-devel mailing list