Re: [R] create new variable with ifelse? (reproducible example)

2012-09-16 Thread Niklas Fischer
Thank you very much for very valuable comments. They are very informative. Bests, Niklas 2012/9/16 Ted Harding ted.hard...@wlandres.net [See at end] On 15-Sep-2012 20:36:49 Niklas Fischer wrote: Dear R users, I have a reproducible data and try to create new variable clo is 1 if know

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-16 Thread Stephen Politzer-Ahles
-- Message: 25 Date: Sat, 15 Sep 2012 23:36:49 +0300 From: Niklas Fischer niklasfischer...@gmail.com To: r-help@r-project.org Subject: [R] create new variable with ifelse? (reproducible example) Message-ID: CADWGO2zANM_UK8qf=JLZHRSqgtPC=NX+rU2kXx=1etw0uqv

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-16 Thread Rui Barradas
23:36:49 +0300 From: Niklas Fischer niklasfischer...@gmail.com To: r-help@r-project.org Subject: [R] create new variable with ifelse? (reproducible example) Message-ID: CADWGO2zANM_UK8qf=JLZHRSqgtPC=NX+rU2kXx=1etw0uqv...@mail.gmail.com Content-Type: text/plain Dear R users, I have

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-16 Thread Niklas Fischer
[ rep_data$know %in% c(very well, fairly well) rep_data$getalong %in% c(4,5),]$clo - 1 Best, Steve -- Message: 25 Date: Sat, 15 Sep 2012 23:36:49 +0300 From: Niklas Fischer niklasfischer...@gmail.com To: r-help@r-project.org Subject: [R] create new variable

[R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread Niklas Fischer
Dear R users, I have a reproducible data and try to create new variable clo is 1 if know variable is equal to very well or fairly well and getalong is 4 or 5 otherwise it is 0. rep_data- read.table(header=TRUE, text= id1id2know getalong 10016_a1 10016_a2

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread Milan Bouchet-Valat
Le samedi 15 septembre 2012 à 23:36 +0300, Niklas Fischer a écrit : Dear R users, I have a reproducible data and try to create new variable clo is 1 if know variable is equal to very well or fairly well and getalong is 4 or 5 otherwise it is 0. rep_data- read.table(header=TRUE, text=

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread Ted Harding
[See at end] On 15-Sep-2012 20:36:49 Niklas Fischer wrote: Dear R users, I have a reproducible data and try to create new variable clo is 1 if know variable is equal to very well or fairly well and getalong is 4 or 5 otherwise it is 0. [A] rep_data- read.table(header=TRUE, text=

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread arun
Fischer niklasfischer...@gmail.com To: r-help@r-project.org Cc: Sent: Saturday, September 15, 2012 4:36 PM Subject: [R] create new variable with ifelse? (reproducible example) Dear R users, I have a reproducible data and try to create new variable clo is 1  if know variable is equal to very well