title: Can't delete file - open i Rstudio
body: <p>Is there a way to force R to delete a file using</p>
  
  <pre><code>unlink()
  </code></pre>
  
  <p>when its open in R?  </p>
  
  <p>When trying to R throws the warning: Warning message:
  In file.remove(ls) :
    cannot remove file 'dat.csv', reason 'Permission denied'. I have a large Global Environment, and have difficulties finding the reason that the file is in use. </p>
  
  <p>When i try to delete in using windows, i get the error: the action cannot be completed because the file is open in Rstudio r session.</p>
  
  <p>Alternativly, is there a way to see which entity is blocking the delete?</p>