Hi Sarah, yes, I followed your suggestion.
If I do exactly what is in the example of the documentation: sink("C:/Temp/sink-examp.txt") i <- 1:10 outer(i, i, "*") sink() unlink("C:/Temp/sink-examp.txt") it does not write anything, i. e. no file is created in "C:/Temp/". The script is executed without an error or warning message. If I run ## 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") # I think ,this was your suggestion sink() unlink("C:/Temp/all.Rout") the script is executed without error or warning message, the file is created in "C:/Temp/" but if I try to open it right away after the script is done the message DE: "Auf das Dokument "C:\Temp\all.Rout" kann nicht zugegriffen werden, da es von einer anderen Anwendung verwendet wird." EN: "Cannot access the document "C:\Temp\all.Rout" cause it is used by another application." What do I do wrong? Kind regards Georg Von: Sarah Goslee <sarah.gos...@gmail.com> An: g.maub...@weinwolf.de, Datum: 10.05.2016 18:46 Betreff: Re: Re: [R] Antwort: Re: Re: sink(): Cannot open file On Tue, May 10, 2016 at 12:34 PM, <g.maub...@weinwolf.de> wrote: > sink(type = "message") But did you do that ^^ as I suggested? If you start a message sink with sink(zz, type="message") as you did, you need to explicitly close that stream. Just using sink() doesn't do it. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.