s-news
[Top] [All Lists]

Data transformation

To: s-news@lists.biostat.wustl.edu
Subject: Data transformation
From: Mariusz <setesh@gazeta.pl>
Date: Sun, 21 Oct 2007 14:42:44 +0200
Resent-date: Sun, 21 Oct 2007 07:41:31 -0500 (CDT)
Resent-from: Mariusz <setesh@gazeta.pl>
Resent-message-id: <20071021124131.79271136D51@mailgate.biostat.wustl.edu>
Hello,

I am just starting with s-plus and have the following problem.
I have some data in file with columns: name, value, data,...
I read it into R by using read.table.

All I need is just a function which changes all non-numerical
characters in 'value' column into specified numeric value(e.g. 0). I
have tried something like:
myData$value[!is.numeric(myData$value)] <- 0
and several other combinations, but with no success :(. Any hints?

-- 
Regards, Mariusz


<Prev in Thread] Current Thread [Next in Thread>