From murdoch at stats.uwo.ca  Wed Dec 16 13:17:53 2009
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Wed, 16 Dec 2009 07:17:53 -0500
Subject: [Rd] Redirect standard output (PR#14148)
In-Reply-To: <20091215202010.AB1F1282EFE9@mail.pubhealth.ku.dk>
References: <20091215202010.AB1F1282EFE9@mail.pubhealth.ku.dk>
Message-ID: <4B28CFF1.8030503@stats.uwo.ca>

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



[Rd] Redirect standard output (PR#14148)
Duncan Murdoch