I have a package 'soilreports' built in RStudio, and following the sound advice on https://r-pkgs.org/. The package produces the appropriate reports as pdfs in the expected folder. It uses the .Rmd file and applies the params.
When I install it in the /usr/local/lib/R/site-library (and restart apache2) to make it accessible by the opencpu server, it is available via the test page on my server, but it fails to run properly when I supply the params by POST.
The test page returns the error message "cannot open the connection In call: file(file, ifelse(append, "a", "w"))".
I interpreted the error as saying that the function cannot write to the working directory. To that directory added a group which contains the right user as I understand it and gave it write permission.
This has not solved it. In the test page when calling "../library/soilreports/R/pointreportgen" with the appropriate params and values, it still produces the error.
Despite much good advice, I am still missing something. I would greatly appreciate advice to interpret the error message and resolve the problem.
thanks David
Try copying the file to your current working directory and then invoking it.