Passing arguments to an Rstudio job

Is there a way to pass arguments to a job? I currently use {docopt} to parse command line arguments like "--verbose" etc. and would like to be able to set them when starting a job.

rstudioapi is a way of programattically starting jobs, it allows you to import the global environment when you start a job, so thats a way you can have values set

I can't just pass command line arguments in the "path", right?

There are ways to pass command line arguments when calling an R script from a OS commandline, but i think thats quite different from Rstudio Jobs. So i foucsdd on the job stuff over the command line passing, as i dont see the connection. Do you prefer to run a r application from an OS console, and not as an Rstudio Job?

There's some discussion of approaches here:

But the tl;dr is that if you are doing something formalized enough to have well-defined parameters, you might be better served by the callr package.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.