title: How do I use `[` correctly with (l|s)apply to select a specific column from a list of matrices?
body: <p>Consider the following situation where I have a list of n matrices (this is just dummy data in the example below) in the object <code>myList</code></p>
  
  <pre><code>mat &lt;- matrix(1:12, ncol = 3)
  myList &lt;- list(mat1 = mat, mat2 = mat, mat3 = mat, mat4 = mat)
  </code></pre>
  
  <p>I want to select a specific column from each of the matrices and do something with it. This will get me the first column of each matrix and return it as a matrix (<code>lapply()</code> would give me a list either is fine).</p>
  
  <pre><code>sapply(myList, function(x) x[, 1])
  </code></pre>
  
  <p>What I can't seem able to do is use <code>[</code> directly as a function in my <code>sapply()</code> or <code>lapply()</code> incantations. <code>?'['</code> tells me that I need to supply argument <code>j</code> as the column identifier. So what am I doing wrong that this does't work?</p>
  
  <pre><code>&gt; lapply(myList, `[`, j = 1)
  $mat1
  [1] 1
  
  $mat2
  [1] 1
  
  $mat3
  [1] 1
  
  $mat4
  [1] 1
  </code></pre>
  
  <p>Where I would expect this:</p>
  
  <pre><code>$mat1
  [1] 1 2 3 4
  
  $mat2
  [1] 1 2 3 4
  
  $mat3
  [1] 1 2 3 4
  
  $mat4
  [1] 1 2 3 4
  </code></pre>
  
  <p>I suspect I am getting the wrong <code>[</code> method but I can't work out why? Thoughts?</p>