[R] zero replacement
Chong Gu
chong at stat.purdue.edu
Tue Aug 3 20:38:57 CEST 1999
X-Authentication-Warning: stat.math.ethz.ch: majordom set sender to owner-r-help at stat.math.ethz.ch using -f
Date: Mon, 2 Aug 1999 15:14:43 -0700
From: Michael Camann <camann at babylon.cnrs.humboldt.edu>
X-Status: N
X-Mailer: Applixware 4.3 (807.141.90)
Sender: owner-r-help at stat.math.ethz.ch
Precedence: bulk
AARRGGHH! Sometimes it's the simple things that are particularly frustrating,
especially late at night....
Can anyone suggest a simple means for replacing all of the zero values in a
matrix with NANs? I ended up writing an awk script to massage the input file,
which works, of course, but is rather an inelegant blunt instrument. I'd
prefer an R operation. I'm certain that I'm missing something obvious here....
--Mike
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michael A. Camann mac24 at axe.humboldt.edu
Assistant Professor of Zoology Voice: 707-826-3676
Dept. of Biological Sciences Fax: 707-826-3201
Humboldt State University
Arcata, CA 95521-8299
http://www.humboldt.edu/~mac24/camann.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
z[z==0]<-NA
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list