Re: [R] Problem with the recode function

2010-06-16 Thread John Fox
Dear Alain, > -Original Message- > From: Alain Guillet [mailto:alain.guil...@uclouvain.be] > Sent: June-16-10 8:30 AM > To: John Fox > Cc: r-help@r-project.org > Subject: Re: [R] Problem with the recode function > > Dear John, > > Thanks a lot for the t

Re: [R] Problem with the recode function

2010-06-16 Thread Alain Guillet
ox wrote: Dear Alain, -Original Message- From: Alain Guillet [mailto:alain.guil...@uclouvain.be] Sent: June-15-10 12:25 PM To: John Fox Cc: r-help@r-project.org Subject: Re: [R] Problem with the recode function I found out what the problem is: when I start R Commander, so

Re: [R] Problem with the recode function

2010-06-15 Thread John Fox
Dear Alain, > -Original Message- > From: Alain Guillet [mailto:alain.guil...@uclouvain.be] > Sent: June-15-10 12:25 PM > To: John Fox > Cc: r-help@r-project.org > Subject: Re: [R] Problem with the recode function > > I found out what the problem is: when I star

Re: [R] Problem with the recode function

2010-06-15 Thread Dave Freedman
I find that sometimes the recode function in car is easier to use, while at other times it's easier to use the recode in Hmisc. If both packages are loaded, you can always use car::recode or Hmisc::recode to specify which function you want. hth, David Freedman, CDC -- View this message in conte

Re: [R] Problem with the recode function

2010-06-15 Thread Alain Guillet
tics Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alain Guillet Sent: June-15-10 10:58 AM To: r-help@r-project.org S

Re: [R] Problem with the recode function

2010-06-15 Thread John Fox
r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Natalie Van Zuydam > Sent: June-15-10 11:59 AM > To: r-help@r-project.org > Subject: Re: [R] Problem with the recode function > > Dear Alain, > > Taking a stab in the dark here but I find

Re: [R] Problem with the recode function

2010-06-15 Thread Natalie Van Zuydam
r of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alain Guillet Sent: June-15-10 10:58 AM To: r-he

Re: [R] Problem with the recode function

2010-06-15 Thread John Fox
of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Alain Guillet > Sent: June-15-10 10:58 AM > To:

[R] Problem with the recode function

2010-06-15 Thread Alain Guillet
Hello, I am using the recode() function in Rcmdr and the result is not what I expect so I am almost sure I did something wrong but what... > test <- data.frame(x=1:10) > library(car) > recode(test$x,'1:5=0 ; else=1', as.factor.result=TRUE) [1] 0 0 0 0 0 1 1 1 1 1 Levels: 0 1 BUT > library(R