I'm facing a problem where I need to access the value of a variable in my Server.R file (I'm using Shiny) in my javascript file. Specifically, I want the variable "i" in myFile.js to be assigned the value of my R variable "number". Can someone guide me on how to achieve this?
For example:
Server.R
...
number <- 5
...
myFile.js
...
var i = ??? // var i = number *is not working*
...
Any assistance would be greatly appreciated.
Regards,
Matt