[R] Replacing string in matrix with zero

Nick Duncan nickdunc at gmail.com
Wed Nov 14 23:13:16 CET 2012


Dear All,

I have a matrix in which the diagonal has the string "Inf" in it. In
order to be able to do cluster analysis this needs to be replaced with
a Zero.
I can do this by putting it into Excel, replacing  and putting it back
into R but it's tedious, and I am sure there is a simple way to do it
in R.
If you have the route to do this, it would be much appreciated.
Best wishes
Nick Duncan



More information about the R-help mailing list