Redirect system2 stdout to file on windows

According to manual, the stdout argument to system2 can redirect output to a file. This seems to work on unix, however I cannot get it to work with windows. Below is an example of toys, there are no out.txt or err.txt . I tried sending it to an existing file or expanding the full path to the file, but without success:

 setwd(tempdir()) system2("whoami", stdout="out.txt", stderr="err.txt") file.exists("out.txt") 

Am I doing something wrong or is this a limitation in system2 ?

+3
r stdout cran devtools
Jul 14 '13 at 9:19
source share
1 answer

Now I am sure that this is an error in RGui.exe on Windows. I filed an error report here: https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15393

+1
Jul 21 '13 at 20:41
source share



All Articles