Perfect, thanks
-Original Message-
From: Rui Barradas [mailto:ruipbarra...@sapo.pt]
Sent: Wednesday, October 17, 2012 9:49 PM
To: Pancho Mulongeni
Cc: r-help@r-project.org
Subject: Re: [R] Setting all rows of a certain level to NA in a factor
Hello,
Try the following.
b <- fac
Hello,
Try the following.
b <- factor(ifelse(!B20_A %in% c("No ", "Yes"), NA, B20_A), labels =
c("No ", "Yes"))
str(b)
Hope this helps,
Rui Barradas
Em 17-10-2012 15:51, Pancho Mulongeni escreveu:
Hello everyone.
My task is set certain levels (that is all rows of that level) as missing
v
On 17-10-2012, at 16:51, Pancho Mulongeni wrote:
> Hello everyone.
> My task is set certain levels (that is all rows of that level) as missing
> values in factor B20_A.
> Excuse the notation, it happens to be a question number in a survey.
> So I thought it would work easily by defining the leve
Hello everyone.
My task is set certain levels (that is all rows of that level) as missing
values in factor B20_A.
Excuse the notation, it happens to be a question number in a survey.
So I thought it would work easily by defining the levels
and their labels using the 'factor' function.
> levels(B2
4 matches
Mail list logo