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
testdata[is.na(testdata$onecolumn)] - -
On Mon, Aug 17, 2009 at 11:41 AM, Steve Murraysmurray...@hotmail.com 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
values in one column of a data.frame
To: r-help@r-project.org
Received: Monday, August 17, 2009, 11:41 AM
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
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 smurray...@hotmail.com wrote:
From: Steve Murray smurray...@hotmail.com
Subject: [R] Replacing NA values in one column of a data.frame
To: r-help@r-project.org
OOPs clumsy cut and paste. :(
--- On Tue, 8/18/09, Uwe Ligges lig...@statistik.tu-dortmund.de wrote:
From: Uwe Ligges lig...@statistik.tu-dortmund.de
Subject: Re: [R] Replacing NA values in one column of a data.frame
To: John Kane jrkrid...@yahoo.ca
Cc: r-help@r-project.org, Steve Murray
-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
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 gunter.ber...@gene.com wrote:
From: Bert Gunter gunter.ber...@gene.com
Subject: RE: [R] Replacing NA values in one column of a data.frame
To: 'Steve
7 matches
Mail list logo