Re: [R] Antwort: Re: Antwort: Re: Re: sink(): Cannot open file

2016-05-11 Thread Henrik Bengtsson
Sounds like it would be helpful to find out exactly which process is holding on to the file in order to figure out what's going on. From a quick look, it seems that http://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows gives some useful info on

[R] Antwort: Re: Antwort: Re: Re: sink(): Cannot open file

2016-05-11 Thread G . Maubach
Duncan, thanks for the hint. I have done it correctly in R fashion ## capture all the output to a file. zz <- file("C:/Temp/all.Rout", open = "wt") sink(zz) sink(zz, type = "message") try(log("a")) ## back to the console sink(type = "message") sink() unlink("C:/Temp/all.Rout") But the error

[R] Antwort: Re: Antwort: Re: Re: sink(): Cannot open file

2016-05-10 Thread G . Maubach
Hi Sarah, John, Jim, Hi All, I have set my envrionment variable path <- file.path("H:", "2016", "Analysis") setwd(dir = path) This works well cause the file is created in that directory. I have tried close(zz) unlink(zz) and neither worked nor did it work out using them together. I had