title: R: Extract value and lines after key word (text file mining)
body: <p>Setting:
  I have (simple) .csv and .dat files created from laboratory devices and other programs storing information on measurements or calculations. I have found this for other languages but nor for R</p>
  
  <p>Problem:
  Using R, I am trying to extract values to quickly display results w/o opening the created files. Hereby I have two typical settings:</p>
  
  <p>a) I need to read a priori unknown values after known key words
  b) I need to read lines after known key words or lines</p>
  
  <p>I can't make functions such as scan() and grep() work.</p>
  
  <p>c) Finally I would like to loop over dozens of files in a folder and give me a summary (to make the picture complete: I will manage this part)</p>
  
  <p>I woul appreciate any form of help.</p>