title: In R, what is the difference between unlink and file.remove?
body: <p>R provides two functions to remove files (and folder) from the file system:</p>
  
  <ul>
  <li><code>unlink</code></li>
  <li><code>file.remove</code></li>
  </ul>
  
  <p>It's not entirely obvious what the differences are, or indeed when to use which, other than that <code>unlink</code> takes some additional arguments.</p>
  
  <p>Reading the source code for these functions doesn't help very much, since both simply calls a compiled C function.</p>
  
  <p>What are the differences? When should you use <code>unlink</code> in preference to <code>file.remove</code>, or vice versa?</p>