[R] Ask for help: find corresponding elements between matrix

2013-02-21 Thread JiangZhengyu
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

Re: [R] Ask for help: find corresponding elements between matrix

2013-02-21 Thread arun
] 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

Re: [R] Ask for help: find corresponding elements between matrix

2013-02-21 Thread Jose Iparraguirre
To: r-help@r-project.org Subject: [R] 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

Re: [R] Ask for help: find corresponding elements between matrix

2013-02-21 Thread Berend Hasselman
On 21-02-2013, at 15:39, JiangZhengyu zhyjiang2...@hotmail.com wrote: 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. -