title: Converting lines of text to a matrix in R
body: <p>I have a file read by readLines in R. Between index sndx and endx is a table of space separated numbers. I would like to convert these to a matrix. For example a toy example file would be:</p>
  
  <pre><code>======
  3 5   # this is how I know sndx and endx
  Some text
  1  123.  456. 789.
  2  345.  678. 123.
  3  235.  123. 345.
  More text
  ======
  </code></pre>
  
  <p>The desired output would be the matrix:</p>
  
  <pre><code>1  123.  456. 789.
  2  345.  678. 123.
  3  235.  123. 345.
  </code></pre>
  
  <p>Is there a way to extract the numerical lines in this way?</p>