From ripley at stats.ox.ac.uk  Wed Dec 16 12:59:40 2009
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 16 Dec 2009 11:59:40 +0000 (GMT)
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: <alpine.LFD.2.00.0912161157080.28313@gannet.stats.ox.ac.uk>

On Tue, 15 Dec 2009, 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.

Please do read the help for system() on your OS.  It is not a bug to 
do what it is documented to do!  The help page gives you the 
workaround (and has for several years).

And a number of people using XP did start finding it this year: it 
seems related to a MS update.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Redirect standard output (PR#14148)
Prof Brian Ripley