yihui / xfun

Miscellaneous R functions
https://yihui.org/xfun/
Other
135 stars 28 forks source link

Allow to pass argument to `Rscript` via `xfun::Rscript_call` #47

Closed cderv closed 3 years ago

cderv commented 3 years ago

I wanted to use xfun::Rscript_call with passing some options to Rscript like --vanilla

Issue is

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 3 years ago

Yes, please. The most challenging part is probably naming. Perhaps cmd_args? (command-line arguments to be passed to Rscript)

cderv commented 3 years ago

I was thinking of rscript_args to be more explicit but that is the same idea.