I am trying to run an R script from PHP.
My PHP file looks like this:
exec("Rscript fig_lollipop.r");
And my R script looks like this:
library('RPostgreSQL')
#more goes code here...
I keep getting the following error:
Error in library("RPostgreSQL"):There is no package called 'RPostgreSQL'
I have attempted searching for common answers to this, and I think it might be related to the www-data user, but I'm really not sure. The R script works fine when running from the terminal.
Thanks in advance for any help! RC