when you read it in na.string=0 On Tue, Aug 12, 2008 at 1:43 PM, rcoder <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I have a matrix that has a combination of zeros and NAs. When I perform > certain calculations on the matrix, the zeros generate "Inf" values. Is > there a way to either convert the zeros in the matrix to NAs, or only > perform the calculations if not zero (i.e. like using something similar to > an !all(is.na() construct)? > > Thanks, > > rcoder > -- > View this message in context: > http://www.nabble.com/ignoring-zeros-or-converting-to-NA-tp18948979p18948979.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
-- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.