Re: [R] recoding charactor variables with special charactors

2009-07-02 Thread John Kane
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

Re: [R] recoding charactor variables with special charactors

2009-07-01 Thread Henrique Dallazuanna
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

[R] recoding charactor variables with special charactors

2009-07-01 Thread Chris Anderson
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