Entering edit mode
Mark B
▴
20
@mark-b-5525
Last seen 10.6 years ago
Hi,
I am trying to replace a single numeric value in a matrix with a
character
vector.
>mat[5580, 4]
[1] 838.1
> mat.r <- replace(mat, mat[5580, 4], "NA")
I don't get any errors. However when I go to see if the number at
mat[5580,
4] was replaced with "NA"
the old number is still there. I don't get any errors.
>mat.r[5580, 4]
[1] 838.1
Any hints on how to do this?
Thanks,
MAB
[[alternative HTML version deleted]]