This is a python not an R problem.
Use of redirection is handled by a shell, not by the executable (usually:
it could depend on the compiler). The Windows system and popen commands
(and hence R's system()) does not use a shell: POSIX OSes do.
It will be cleaner to use Rscript to run scripts.
'Rterm --help' shows the usage as:
Rterm [options] [< infile] [>outfile] [EnvVars]
just in case you didn't understand what the angle brackets meant:
the term "[< infile]" means "read input from 'infile'", and
the term "[> outfile]" means "write output to 'outfile'".
Though your code works at th
Hi,
I'm trying to execute R-script from Python. I'm using R 2.7.2, Python 2.5
and WinXP.
I don't won't to use Python/R interface because of nature of project.
Python code :
import subprocess
command = 'c:\\Program Files\\R\\R-2.7.2\\bin\\Rterm.exe --vanilla -q
d:\\output.out'
subprocess.Popen(
3 matches
Mail list logo