Clearly the poor user needs to export something to one of those archaic stats
systems like SAS or SPSS :)
--- On Tue, 8/18/09, Bert Gunter wrote:
> From: Bert Gunter
> Subject: RE: [R] Replacing NA values in one column of a data.frame
> To: "'Steve Lianoglou'" , &
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Steve Lianoglou
Sent: Tuesday, August 18, 2009 7:25 AM
To: John Kane
Cc: r-help@r-project.org; Steve Murray
Subject: Re: [R] Replacing NA values in one column of a data.frame
OOPs clumsy cut and paste. :(
--- On Tue, 8/18/09, Uwe Ligges wrote:
> From: Uwe Ligges
> Subject: Re: [R] Replacing NA values in one column of a data.frame
> To: "John Kane"
> Cc: r-help@r-project.org, "Steve Murray"
> Received: Tuesday, August 18, 200
;-999
R> a
[1] 1 2 3 NA NA 10 20 NA NA
R> a[is.na(a)] <-999
R> a
[1] 1 2 3 999 999 10 20 999 999
Hope that helps,
-steve
--- On Mon, 8/17/09, Steve Murray wrote:
From: Steve Murray
Subject: [R] Replacing NA values in one column of a data.frame
To: r-help@r-project.or
John Kane wrote:
Perhaps
testdata$onecolumn[testdata$onecolumn==NA] <-
Well, with is.na() there is a much better chance to make it work
Uwe Ligges
--- On Mon, 8/17/09, Steve Murray wrote:
From: Steve Murray
Subject: [R] Replacing NA values in one column of a data.frame
To
Perhaps
testdata$onecolumn[testdata$onecolumn==NA] <-
--- On Mon, 8/17/09, Steve Murray wrote:
> From: Steve Murray
> Subject: [R] Replacing NA values in one column of a data.frame
> To: r-help@r-project.org
> Received: Monday, August 17, 2009, 11:41 AM
>
> Dear al
testdata[is.na(testdata$onecolumn)] <- -
On Mon, Aug 17, 2009 at 11:41 AM, Steve Murray wrote:
>
> Dear all,
>
> I'm trying to replace NA values with - in one column of a data frame.
> I've tried using is.na and the testdata[testdata$onecolumn==NA] <-
> approach, but whilst neither
Dear all,
I'm trying to replace NA values with - in one column of a data frame. I've
tried using is.na and the testdata[testdata$onecolumn==NA] <- approach,
but whilst neither generate errors, neither result in -s appearing - the
NAs remain there!
I'd be grateful for any advice o
8 matches
Mail list logo