title: R: applying function to matrix except individual cell(s)
body: <p>Suppose I have a 10x10 matrix. How can I fill it with 0's while excluding certain individual cells (preferably in a single operation)?</p>
  
  <pre><code>blank &lt;- matrix(NA,nrow=10,ncol=10)
  for (i in 1:10) {for (j in 1:10) {blank[i,j] &lt;- 0 }}
  # except blank[2,5], blank[9,3], blank[1,4], to be left NA
  </code></pre>