[R] How to select multiple cells in a matrix and perform an operation on corresponding cells in another matrix of the same size?

2014-03-24 Thread Vermeulen, Lucie
I am trying to write an R script to do pollution routing in world rivers, and need some help on selecting matrix cell coordinates and applying these to other matrices of the same dimension. My data: I have several matrices corresponding to hydrological parameters of world rivers on a half degre

Re: [R] How to select multiple cells in a matrix and perform an operation on corresponding cells in another matrix of the same size?

2014-03-25 Thread Vermeulen, Lucie
at[row,col]*flowmat[row,col] } } } } -Original Message----- From: Jim Lemon [mailto:j...@bitwrit.com.au] Sent: maandag 24 maart 2014 22:45 To: Vermeulen, Lucie Cc: 'r-help@R-project.org' Subject: Re: [R] How to select multiple cells in a