[Rd] Redirect standard output (PR#14148)

Duncan Murdoch murdoch at stats.uwo.ca
Wed Dec 16 13:17:53 CET 2009


On 15/12/2009 3:20 PM, joemsong at cs.nmsu.edu wrote:
> Full_Name: Joe Song
> Version: 2.10.0
> OS: Windows 7
> Submission from: (NULL) (97.123.159.234)
> 
> 
> Symptom: The following command in R
> 
>> system("program > run.log")
> 
> would not redirect standard output to the file "run.log".
> 
> This bug did not exist on Windows XP, but appeared on Windows 7 when the same
> program is run.

That doesn't work on XP if program is an .exe, and I wouldn't expect it 
to.  The system() command on Windows doesn't process redirects.  See the 
documentation.

Duncan Murdoch



More information about the R-devel mailing list