r - Libraries not loading when running Rscript from PHP -
i trying run r script php.
my php file looks this:
exec("rscript fig_lollipop.r");
and r script looks this:
library('rpostgresql') #more goes code here...
i keep getting following error:
error in library("rpostgresql"):there no package called 'rpostgresql'
i have attempted searching common answers this, , think might related www-data user, i'm not sure. r script works fine when running terminal.
thanks in advance help! rc
i ran .libpaths()
command in terminal, , discovered additional folder (where of relevant packages stored), compared .libpaths()
command run web app. ended copying relevant packages folder listed in web app .libpaths()
, , works now.
thanks "mrflick" advice! i'm newbie stuff, , thought packages installed users.
Comments
Post a Comment