I’m running several scripts on a hpc and it would be helpful to know what is currently running when I check the .slurm file
I’m writing my R script on VScode, and running
context <- rstudioapi::getSourceEditorContext()
cat("n", "n", "n", 'Current script: ', basename(context[[2]]), "n", "n", "n", "n")
does not work (Error: RStudio not running
), and I cannot find another function that does this simple thing. I configured my settings.json with the “r.lsp.path” and “r.rpath.mac” paths,
Any help is appreciated, and I’ve already checked and tried through:
How to find the name of script that is currently running in R? [duplicate]
Get the path of current script
How to get the file name of the R script currently being executed (for easy automatic email of results) [duplicate]
Determine path of the executing script
and they do not work.
Thank you!