[R] Inf and NA

Trying To learn again tryingtolearnagain at gmail.com
Sat Jun 9 13:00:25 CEST 2012


Hi all,

I have a csv matrix "KT.csv" and it has Inf and NA

I want to calculate the mean of each row so I use

rowMeans(KT,na.rm = TRUE) but with this Inf cannot be omminted.

I´m trying to use before running rowMeans(KT,na.rm = TRUE)

KT<-range(KT,finite=TRUE)

but it doesn´t works...

Do you know a simple way to ommit Inf en the calculations?

Many thanks.

I have tried also to replace Inf by NA bt also I dind´n t get it....

I feel....like a mule...


More information about the R-help mailing list