I am running R script in the php code in apache webserver, in my script I am giving code for loading ( kohonen library). whole R-script will be running through php coding as exec("Rscript script.R");
R code
library("kohonen")
load(file = "som.rda")
tr<-read.csv("trainnew1.csv")
compile11<-tr
write.table(compile11, file = "kohonen1.txt")
and etc........
in terminal this code is running, but while giving in php it is not executing and loading the library
for checking the library loading, i wrote simple code for addition by loading library in first line
example
library("kohonen")
a<-3
b<-5
c<-a+b
print(c)
it is not printing c in output file, because of kohonen library
same addition i tried with loading nnet library
example
library("nnet")
a<-3
b<-5
c<-a+b
print(c)
It is printing c in the output file. problem is with loading kohonen library please suggest me, how to load kohonen libary and then how to fix this problem