Oh, that's great, I didn't know about that & it will be quite handy - thanks.
That command gets the ID for the R session; is there any way to get the Process ID of the RStudio project?
**Editing after the thread was closed: To figure out the RStudio process, ID the R process & open that process by double clicking it the Activity Monitor. In the top left corner it gives you a link to open the parent process, which if you're running R via RStudio is the RStudio process.