title: R2HTML cannot open connection
body: <p>I am producing a repetitive HTML report displaying tables and graphs computed with R. I am using functions from the R2HTML package, embedded in a for loop. I do not have admin rights on my machine.
  At some point in the computations, I sometimes get the following error :</p>
  
  <blockquote>
    <p>Error in file(file, ifelse(append, "a", "w")) : 
     cannot open the connection
    In addition: Warning message:
    In file(file, ifelse(append, "a", "w")) :
     cannot open file 'P:/My Documents/R/test.html': Permission denied</p>
  </blockquote>
  
  <p>This does not happen at every run, nor at the same point in the code. 
  I can get the same error when I try to run the following simple code :</p>
  
  <pre><code>require( R2HTML)
  
  .HTML.file = file.path( 'P:/My Documents/R' , 'test.html' )  
  # To set the access path to the HTML file  that will be created
  
  cat(paste("&lt;html&gt;&lt;head&gt;&lt;title&gt;", 'test.html', "&lt;/title&gt;&lt;/head&gt;", sep = ""), file = .HTML.file , append = FALSE ) 
  # To create and initiate the HTML file
  
  for( i in 1:100 )
  {
      HTML('Test')
  }
  # To write the same line to the HTML file repeteadly
  </code></pre>
  
  <p>Most of the time this loop can run without any problems, but sometimes it will produce the above error (sometimes at the beginning of the loop, sometimes at the end).
  Does anybody know what causes this? I am using R-2.15.0 on a Windows xp pro machine. If anybody can help me with this, I would be most greatful.
  Thanks.</p>