First of all try str(socia) and see what the structure of the data is. R seems
to be interpreting that character string as a format If I am reading the error
message correctly.
--- On Wed, 7/1/09, Chris Anderson wrote:
> From: Chris Anderson
> Subject: [R] recoding charactor var
It's because the levels of factor, don't characters:
f <- factor(c("AAA's", "B(s)", "CCC"))
levels(f)[levels(f) == "AAA's"] <- "AA"
On Wed, Jul 1, 2009 at 4:43 PM, Chris Anderson wrote:
> I have a several character variables that I need to recode, but some of
> them have special characters
I have a several character variables that I need to recode, but some of them
have special characters like single quote or ( ). How tell R to ignore these
special characters so I can rename them? Below is the error message I am
getting.
social$FamilySupport[social$FamilySupport=="Mr. XXXs' exte
3 matches
Mail list logo