title: How to read a text file to a list array?
body: <p>I just started coding in R-Lang and I was wondering what the best way to read a plan text file is? I am looking for something like this pseudo-code:</p>
  
  <pre><code>data = new List();
  data = file.readall("myfile.txt")
  close
  
  foreach (a in data) {
    print(a)
  }
  </code></pre>
  
  <p>pretty simple text, I read the tutorials but dont understand how R's file access works, it looks very much different to anything im used to.. I'm unsure what args to use.</p>