Forum Discussion
davor
8 years agoRegular Visitor
Published R reports with sourced scripts
Do I have an option to publish R scripts as well when publishing reports? I would like to do: source('path/to/script.r') A workable option is to import the script files with 'Get Data' -> 'Fold...
davor
8 years agoRegular Visitor
I also tried sourcing from the web:
source('https://raw.githubusercontent.com/.../model.r')
But it seems this is explicitely blocked:
Error in file(filename, "r", encoding = encoding): cannot open the connection
In addition:
Warning message: In file(filename, "r", encoding = encoding):
InternetOpenUrl failed: 'The server name or address could not be resolved'
davor
8 years agoRegular Visitor
Each r-visual also seems to operate in its own VM environment, so if you export something to "C:\Reports" with one visual, the other visual doesn't see it in "C:\Reports".
If this was possible, one could use one visual to parse the code from "Get Data -> Folder", and the others could load it from "C:\Reports" when available with something like:
while (!file.exists('parsed.r')) {
Sys.sleep(0.01)
}
load('parsed.r')Pff, getting out of ideas...