I have installed [rapache][1] and i am trying to fit a linear model
inside the R script file. I have configured the RFileHandler in the
http.conf. When i am trying to invoke the summary(model) it is giving
me a segment fault error ( i see this in the apache log file). I am
guessing that it is trying to print to the console and that is why it
is failing.
Has any one encountered a similar problem with R and rapache? I am
relatively new to R and summary is doing a lot of things that are not
directly exposed as functions so i am hoping i could get it to work
Here is my r script
mydata<- read.table("/home/user/test.csv",header=TRUE,sep=",")
fit<- lm(y~x1+x2+x3,data=mydata)
setContentType("text/html")
cat('<HTML><BODY>')
cat(summary(fit)$adj.r.squared)
cat('</BODY></HTML>\n')
DONE
if i replace
cat(summary(fit)$adj.r.squared)
with this
cat(coef(fit))
it is working!
Thanks
Bharani
[1]:
http://biostat.mc.vanderbilt.edu/rapache/