0

I have the following line in my R Markdown code chunk RStudio.Version()$version

when I run the knit on the R Markdown to create a Word document, I get the following error message:

Error in RStudio.Version(): could not find function "RStudio.Version"

When I run this function RStudio.Version() in RStudio console, I get the version and the function runs, but not with knit when I run R Markdown.

Anyone has an advice or solution?

Phil
  • 7,287
  • 3
  • 36
  • 66
CodeMaster
  • 63
  • 4
  • As far as I know, that function doesn't exist anywhere. If you are looking for the version of your IDE, you can have it returned with `rstudioapi::versionInfo()` – Phil May 16 '20 at 03:34

1 Answers1

0

I was able to replicate your issue running RStudio.Version() while knitting. As Phil suggests, rstudioapi::versionInfo() seems the best alternative while knitting.

engineerchange
  • 419
  • 1
  • 6
  • 22