S
stephen
I am trying to use redirection and it does not work.
***********
ds = InputBox("Type in reporting date as YYYY-MM-DD", "reporting date")
exestr = "Rterm --restore --save < m.in.R > out.txt --args " & ds
ret = Shell(exestr) ' opens Rterm and does not source the script
*************
if I put the string in a batch file aaa.bat and use
ret=Shell(aaa.bat)
then redirection works, but I lose the return value from the process. ret
simply reports whether cmd started successfully.
I need to have the value returned from Rterm, which is 0 upon successful
finish and -1 otherwise.
***********
ds = InputBox("Type in reporting date as YYYY-MM-DD", "reporting date")
exestr = "Rterm --restore --save < m.in.R > out.txt --args " & ds
ret = Shell(exestr) ' opens Rterm and does not source the script
*************
if I put the string in a batch file aaa.bat and use
ret=Shell(aaa.bat)
then redirection works, but I lose the return value from the process. ret
simply reports whether cmd started successfully.
I need to have the value returned from Rterm, which is 0 upon successful
finish and -1 otherwise.