Someone wrote a package (we'll call it 'Thing') that relies heavily on Rstudio to work, including requiring the rstudioapi
library. It has an authentication routine that
relies on the rstudioapi::askForPassword("Enter your pw")
function.
If I run the setup routine, it throws this sort of error:
> setup_thing()
Thanks for downloading Thing, the custom R package for things.
Loading required package: rstudioapi
Error: RStudio not running
I am trying to avoid re-writing the entire library; Is there a way to install and set up the package in RStudio, but use its configured instance from R CLI?
I think the answer is unfortunately no. But there might be a work around. Have you investigated cronR
? https://cran.r-project.org/web/packages/cronR/README.html
You could potentially schedule the jobs within Rstudio itself.