Message-ID: <A4E5A0B016B8CB41A485FC629B633CED4A3342EFC3@GOLD.corp.lgc-group.com>
Date: 2013-01-21T15:42:38Z
From: S Ellison
Subject: missing values are not allowed in subscripted assignments of data frames
In-Reply-To: <CAA1twZRpCRs46otNZjAML21WpUypo=jb7jY=WkPw=_q5A3Z0bQ@mail.gmail.com>
> I am trying to replace community numbers with community
> names (character).
> I am using the following code:
>
> data[data$commNo==786, "commNo"]<-"Name of the Community"
>
> Unfortunately, I get the error message
> missing values are not allowed in subscripted assignments of
> data frames
>
> However, when I check data$commNo with table(useNA="always") or with
> table(is.na(data$commNo)) it tells me that there are no NA's
> at all... ?
Two things to check:
Are there matches to data$commNo==786 ?
And is commNo numeric, character or factor?
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}