Hi
data.frame[data.frame<20] <- NA
works In R so maybe it work in S+ too.
HTH
Petr
On 21 Aug 2006 at 16:22, Khan, Sohail wrote:
Subject: [S] replacing values in a data frame
Date sent: Mon, 21 Aug 2006 16:22:36 -0400
From: "Khan, Sohail" <khan@cshl.edu>
To: <s-news@lists.biostat.wustl.edu>
> Dear list,
>
> I have a large data frame with several numerical columns, I would like
> to replace all the values < 20 to NAs. How could I do this? Thanks
> for your suggestions.
>
> Sohail
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
Petr Pikal
petr.pikal@precheza.cz
|