atomic [1:1578] 0 0 0 0 0 0 0 0 0 0 ...
 - attr(*, "levels")= chr "0=0,1:33=1"

2010/4/7 David Winsemius <dwinsem...@comcast.net>

>
> On Apr 7, 2010, at 1:31 PM, Vlatka Matkovic Puljic wrote:
>
>  Hi,
>>
>> I have numerical variable that I want to recode into categories '0' and '1
>> and more' and do analysis with that data.
>> I have tried various of possibilities to do so, but I am sucked and
>> nothing
>> is working.
>>
>> recode(Q12, "0='A';1:30='B'")
>> cut(Q12, breaks=c(0,1,30), lables=c('0', '1 and more'))
>> cat(Q12, "0=0;1-33=1")
>>
>> What should I do to make it right?
>>
>
> What does str(Q12) return?
>
>
>> --
>> **************************
>> Vlatka
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> David Winsemius, MD
> West Hartford, CT
>
>


-- 
**************************
Vlatka MatkoviƦ PuljiƦ
095/8618 171

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to