Displaying 1 result from an estimated 1 matches for "1.0948252".
2013 Feb 21
3
Ask for help: find corresponding elements between matrix
Dear R experts,
I have two matrix (seq & mat) & I want to retrieve in a new matrix all the numbers from mat that =1 (corresponding to the same row/ column position) in seq, or all the numbers in mat that =-1 in seq. - Replace all the numbers with NA if it's not 1/-1 in seq. There are some "NA"s in seq.
seq=matrix(c(1,-1,0,1,1,-1,0,0,-1,1,1,NA),3,4)