Setting R version programmatically in RStudio Server Pro

At my university we teach R using the latest version of RStudio Server Pro.
At nice feature of the Pro version is the ability to choose from different versions of R installed on our system.
And we often use older version of R for specific teaching sessions.
However, students often forget to switch the R version using the RStudio dropdown menu, requing a lot of trouble shooting.

So the question is whether there is a way of setting the R version programmatically, ideally in the .Rprofile script of an RStudio project.

System Information:

  • RStudio Edition: Server
  • RStudio Version: RStudio Server Pro 1.4.1103-3
  • OS Version: CentOS Linux 7

5 R Sessions | RStudio Server Professional Edition 1.4.1103-4
Possibly covered here