Skip to content
Prev 77650 / 398502 Next

source(file) => file becomes readonly

Prof Brian Ripley wrote:
But R doesn't open files in an exclusive mode.  It opens them in "share 
deny none" mode (_SH_DENYNO; this is an undocumented feature of the MSVC 
run-time library that MinGW uses).  I suspect whatever editor Hjellvik 
was using attempted to open the file with exclusive access, and when 
that failed (because R had it open), it fell back to read-only access.

It's certainly possible to open a file for write access in another 
process while R has it open for read access.  You just can't get 
exclusive access to it.

Duncan Murdoch