rstudioapi::getActiveDocumentContext()$path
I believe thats is what you are looking for.
I believe thats is what you are looking for.
Or I could just use a sane language and go home in time for dinner.
(I mean I know about all the solutions and non-solutions; I've looked into this at least a dozen times over the last 5+ years. My point is that this shouldn't have been an issue in the first place.)
100% agree with R is not a sane language.