I got this error:
> tikz(file="plot.tex")
> cr.plots(lm(A ~ B, data = C), ask = F)
Error in createLockFile(lockname) : cannot create lock file
By some googling, I found a similar report (with no replies):
http://r.789695.n4.nabble.com/debug-R-device-plot-tt3403638.html
So what's wrong is that I had earlier aborted cr.plots() by pressing
ctrl-C, and it appears that somebody didn't clean up the
tikzMetricDictionary lock file. Moreover, tikzDevice appears to
proceed to call close(-1) if creating the file fails (strace output):
open("/tmp/Rtmp1HU5cv/tikzMetricsDictionary", O_RDONLY) = 4
open("/tmp/Rtmp1HU5cv/tikzMetricsDictionary___LOCK",
O_WRONLY|O_CREAT|O_EXCL, 0666) = -1 EEXIST (File exists)
close(4294967295) = -1 EBADF (Bad file descriptor)
write(2, "Error in createLockFile(lockname"..., 60) = 60
Removing the ___LOCK file fixed things for me.
Just wanted to let you know. My version of R is 2.10.0 (2009-10-26)
and my version of tikzDevice is 0.5.3.
Vegard
_______________________________________________
Tikzdevice-bugs mailing list
Tikzdev...@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs
Thanks, we had a report of this a while back and our suggestion then was:
> You need to look for a file (it may not be in your project directory) that contains "___LOCK" in its file name and delete it. filehash creates this to prevent multiple writes to the same file at the same time and somehow it did not get removed correctly.
So if you encounter this again, the only real solution I know if is to
remove this file manually, since this is a file created by filehash.
-Cameron
-Charlie