I installed mod_r according to the specifications, and have been trying
to get the demo script to work correctly. I am running debian, the
latest build of R, apache 2 with prefork mpm, and the latest mod_r. Is
anyone else using this module successfully? I added:
LoadModule R_module mod_R.so
<Location /test/hello>
SetHandler r-handler
Rsource /var/www/html/test.R
RreqHandler handler
</Location>
to my http.conf and
test.R in /var/www/html is:
handler<-function(r){
apache.write(r,"<h1>Hello World!</h1>")
OK
}
When I start apache2, my /tmp directory fills with rtmp directories
until memory is exausted. The first time it created 32,000 before I
noticed. Does anyone have any idea as to what I could be doing wrong, or
have a software configuration that works? Thank you for all of your
help. ~BJ
Infinite loop running Mod_R/Rapache
5 messages · BJ, Bill Szkotnicki, Frank E Harrell Jr +2 more
Hello, Recently I have been reading a lot of material about statistical modeling using R. There seems to be conflicting opinions about what the best approach is between the SAS community and the R community. 1) In R one might start with a model that has all possible effects of interest in it and then simplify by eliminating/adding insignificant effects using a stepwise procedure. 2) In SAS one may starts with a "reasonable" model and look at type 3 SS's to test hypotheses and report LSMEANS. This can be done in R too I think. Does anyone have current opinions about this? I know it's been discussed before but I would be very interested in hearing about the advantages and pitfalls of both approaches. Bill
Bill Szkotnicki wrote:
Hello, Recently I have been reading a lot of material about statistical modeling using R. There seems to be conflicting opinions about what the best approach is between the SAS community and the R community. 1) In R one might start with a model that has all possible effects of interest in it and then simplify by eliminating/adding insignificant effects using a stepwise procedure. 2) In SAS one may starts with a "reasonable" model and look at type 3 SS's to test hypotheses and report LSMEANS. This can be done in R too I think. Does anyone have current opinions about this? I know it's been discussed before but I would be very interested in hearing about the advantages and pitfalls of both approaches. Bill
You'll get lots of opinions about this. Both R and SAS can be abused terribly, and both approaches you mentioned have major problems if you use P-values to specify models. Better and more replicable results can be obtained using modern shrinkage methods and being more liberal with inclusion of variables, or by using Bayesian model averaging. Note that LSMEANS and Type III tests are SAS concoctions and that if you have interactions in the model, type III tests have been criticized. If there are no interactions, type Type III = Type II. Frank Harrell
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
BJ wrote:
I installed mod_r according to the specifications, and have been trying
to get the demo script to work correctly. I am running debian, the
latest build of R, apache 2 with prefork mpm, and the latest mod_r. Is
anyone else using this module successfully? I added:
LoadModule R_module mod_R.so
<Location /test/hello>
SetHandler r-handler
Rsource /var/www/html/test.R
RreqHandler handler
</Location>
to my http.conf and
test.R in /var/www/html is:
handler<-function(r){
apache.write(r,"<h1>Hello World!</h1>")
OK
}
When I start apache2, my /tmp directory fills with rtmp directories
until memory is exausted. The first time it created 32,000 before I
noticed. Does anyone have any idea as to what I could be doing wrong, or
have a software configuration that works? Thank you for all of your
help. ~BJ
This is definitely an apache configuration problem. After responding to you privately about this issue, I got paranoid and checked the latest R/Apache code release (rapache-0.1.1) with the following debian packages: apache2-common/unstable uptodate 2.0.55-4 apache2-utils/unstable uptodate 2.0.55-4 apache2-mpm-prefork/unstable uptodate 2.0.55-4 apache2-prefork-dev/unstable uptodate 2.0.55-4 I could not reproduce the behavior you are witnessing. Maybe you can send me (off-list) your /etc/apache2/apache2.conf, /etc/apache2/sites-enabled/* and see if I can't help you troubleshoot. But this bit of R creating a temp dir (for transient files?) needs to be handled more delicately in a server environment. I'm going to do some more digging in the R source... I hope I haven't made some glaringly wrong assumptions.
Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Biostatistics Vanderbilt University
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060203/d41bd8c9/attachment.pl