[R] Output of warnings inside the source function

Thomas Lumley tlumley at u.washington.edu
Sun Sep 11 23:39:06 CEST 2005


On Sun, 11 Sep 2005, Arkady Sherman wrote:
>
> "c:\Program Files\R\rw2011\bin\R.exe" --no-save < test > out.txt
>
> the file "c:/temp/foo.txt" will contain nothing.
> But I'd like it should contain the warning message "Foo warning".
> Is the behavior a bug of R or there is another way to get it working.

The help page for sink() documents the behaviour you are seeing, so it 
isn't a bug. The help page also describes how to do what you want, and 
even gives an example.

 	-thomas




More information about the R-help mailing list