title: saving lists as elements of matrix
body: <p>I am trying to add lists as an element of matrix. I am using the following code</p>
  <pre><code>wiip &lt;- matrix(list(), 5, 5)
  for (i in colnames(wave1)) {
      for (j in colnames(wave1)) {
          wiip[[i,j]] &lt;- gclo(wave1[[i]], wave1[[j]])
      }
  }
  </code></pre>
  <p>the <code>wiip[[i,j]]</code> says subscripts out of bounds.
  the output from the function gclo is a list and I want to save all the outputs. that is the double loop creates i*j(i runs over 1 to 5 and so does j, hence total 25 lists objects are created) number of lists. how to save each list together in one object.</p>