title: Converting a vector to input of a matrix/array
body: <p>Say one has </p>
  
  <pre><code>input=c(1,2)
  mat=matrix(1:9,ncol=3)
  </code></pre>
  
  <p>how does one convert the input vector into a form that allows one to call</p>
  
  <pre><code>mat[input]
  </code></pre>
  
  <p>and receive the mat[1,2] element of the matrix? I ask because I want to edit elements of an array of length n.</p>