title: R: Export and import a list to .txt file
body: <p><a href="https://stackoverflow.com/questions/3044794/r-print-list-to-a-text-file">This post</a> suggests a way to write a list to a file.</p>
  
  <pre><code>lapply(mylist, write, "test.txt", append=TRUE, ncolumns=1000)
  </code></pre>
  
  <p>The issue with this technic is that part of the information of the list (the structure into subparts and the names of the subparts) disappear and it is therefore very complicated (or impossible if we lost the extra information) to recreate the original list from the file.</p>
  
  <p><strong>What is the best solution to export and import (without causing any modification, including the names) a list?</strong></p>