I am running R on EC2 spot instances and I need R to terminate the instance and cancel the spot request once the script has run.
For that I have set the \"Request ID
I'm pretty new to R but my approach was this: I had project-level environment variables stored in a .env file. To make it accessible in R, I used
.env
> readRenviron(".env")
Then to access a specific variable
> Sys.getenv("RDS_UID")
And it worked perfectly.