Entering edit mode
Daniel M.
▴
20
@daniel-m-4380
Last seen 10.5 years ago
Hello,
I was trying to replace some values in a data matrix using their index
as a
reference by NA.
Say i have the following data matrix
mydata
1 2 3 4 1 6
2 3 4 5 6 6
3 5 6 2 7 0
and i have also
myindices
1 2
1 5
3 5
that refers to the data values above, for example 1 2 means that row 1
and
column 2, that has a value of 2 in mydata, 1 5 means the value 1 in
the first
row and 5th col.
I want to replace those index values as in "myindices" from "mydata"
by NA's.
Is there anyone who can suggest me as to how to do this, please?
Thank you
Daniel
[[alternative HTML version deleted]]