title: parsing a .txt file to be read for data.frame
body: <pre><code>y&lt;-readLines("output.txt")
  </code></pre>
  
  <p>After I read the txt file, I need to format this data to a data frame with certain number of columns. Need to get rid of letters and rows that do not have 21 columns. I am doing the following to parse out - and any letters.</p>
  
  <pre><code>p&lt;-gsub("-","",p)
  p&lt;-gsub("[aA-zZ]","",p)
  </code></pre>
  
  <p>System configuration: lcpu=96 mem=196608MB ent=16.00</p>
  
  <blockquote>
  <pre><code>   kthr            memory                         page                       faults                 cpu             time  
  ----------- --------------------- ------------------------------------ ------------------ ----------------------- --------
    r   b   p        avm        fre    fi    fo    pi    po    fr     sr    in     sy    cs us sy id wa    pc    ec hr mi se
   19   0   0   21337487    7123470     0   201     0     0     0      0  3576  66723 30304 19  4 77  0  5.97  37.3 00:02:30
   27   0   0   21337431    7121069     0   123     0     0     0      0  4298  81526 36157 19  4 78  0  5.61  35.1 00:03:00
   18   0   0   21333631    7122351     0   195     0     0     0      0  3696  65163 30794 23  4 74  0  6.49  40.6 00:03:30
   19   0   0   21333590    7119082     0   194     0     0     0      0  5217 102823 47621 27  5 68  0  7.79  48.7 00:04:00
  
     kthr            memory                         page                       faults                 cpu             time  
   ----------- --------------------- ------------------------------------ ------------------ ----------------------- --------
     r   b   p        avm        fre    fi    fo    pi    po    fr     sr    in     sy    cs us sy id wa    pc    ec hr mi se
    20   0   0   21347610    7204383     0   167     0     0     0      0  3645  73642 33333 21  3 75  0  6.21  38.8 00:12:30
    16   0   0   21347576    7201448     0   110     0     0     0      0  4882  84287 40503 23  4 73  0  6.77  42.3 00:13:00
  </code></pre>
  </blockquote>
  
  <p>Once I parse out the unwanted to characters, I have some empty lines. This yet not a data frame, How would I get rid of empty lines here?</p>