Allow to pass argument to `Rscript` via `xfun::Rscript_call`
cderv opened this issue · 2 comments
cderv commented
I wanted to use xfun::Rscript_call
with passing some options to Rscript
like --vanilla
Issue is
- you need to pass these options to
system2()
fromxfun::Rscript_call()
. ...
is made for that butsystem2()
expectargs=
which is already used byxfun::Rscript_call()
This does not seems possible for now. I think we need a rscript_args=
to pass.
Also, if this function does not supports it, one could use callr which has this option. (and which I did)
If you want to support that, I'll open a PR.
yihui commented
Yes, please. The most challenging part is probably naming. Perhaps cmd_args
? (command-line arguments to be passed to Rscript
)
cderv commented
I was thinking of rscript_args
to be more explicit but that is the same idea.