From kevin.r.coombes at gmail.com  Thu Apr  5 16:04:49 2012
From: kevin.r.coombes at gmail.com (Kevin R. Coombes)
Date: Thu, 05 Apr 2012 09:04:49 -0500
Subject: [Rd] "NA" vs. NA
In-Reply-To: <CAJ=0CtD-C6Gh2Mn9tojWUGrciDLaPZkyuBDWeOyx1YhBTRJjfw@mail.gmail.com>
References: <CAJ=0CtBXsC22CW8_UnyYvsi-w9PJc=iXYQbW6srC0d3VYs0O2Q@mail.gmail.com>
	<XFMail.20120405122203.Ted.Harding@wlandres.net>
	<CAJ=0CtAur8KCFNx+bWoj_-sM6q17eW+Giki1HgqPJh=z_jgzYA@mail.gmail.com>
	<4F7D86E1.9070601@gmail.com>
	<CAJ=0CtD-C6Gh2Mn9tojWUGrciDLaPZkyuBDWeOyx1YhBTRJjfw@mail.gmail.com>
Message-ID: <4F7DA681.3000705@gmail.com>

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
>



[Rd] "NA" vs. NA
Kevin R. Coombes