I can do this in the RStudio console,
RStudio.Version()$version
[1] ‘1.1.442’
But, when I put this
RSver <- RStudio.Version()$version
in an Rmd file and click the [Knit] button, I get the following error.
Error in RStudio.Version() : could not find function "RStudio.Version" Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval
I suspect that I just need to load a library, but I can't figure out which one it would be. I tried rstudioapi and rversions.
OS: win7, 64 bit
R: 3.4.4, 64 bit