[R] Removing -Inf values from all the colums in a dataframe

Ramya ramya.victory at gmail.com
Thu Feb 24 04:27:48 CET 2011


Hi there,

b is my dataframe.

I have a dataframe. I am trying to get rid of the -INF values but didnt have
much luck

b[which(is.finite(b))]

I can get rid of it for a single column

b[,1][which(is.finite(b[,2]))] but not for all dataframe I used it inside of
a sapply but still no dice

my guess is it might have some differing row numbers and just ignoring the
columns itself. 

Thanks
Ramya




-- 
View this message in context: http://r.789695.n4.nabble.com/Removing-Inf-values-from-all-the-colums-in-a-dataframe-tp3322059p3322059.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list