Programmatically launch Rstudio

I want to automate running R scripts using R studio. Is it possible to launch R studio from python and schedule to run R scripts? Thank you

I'm not sure I follow.

RStudio is an IDE, what would you like to do with RStudio specifically that you can't do with R (the engine)?

I am in a test team. I have to mimic how customer will run R scripts on our database. I suppose customer will use some IDE like R studio or jupyter to run R scripts. I understand that there are ways to test R scripts directly instead of launching an IDE. But I need mimic how customer will run R scripts.

When you run Rscript in rstudio it only runs the script with the R engine. Each user who access rstudio will have a rsession running and it is all that matters.
Do you provide the rstudio environment also? Because if not, it will be very difficult to reproduce the exact Environnement of your users because you don't know how they could modify their session.

The best thing to do would be to test the script against supported R version asd R packages you depend on to ensure to your customer that it is working under those conditions, rstudio or not.
packages in cran contains script and are tested that way. Users will use those packages in the environment they have.

Not sure what you are asking is possible... :thinking: