Brew Examples
The point of this page is to show how R can be used in the
backend of a website. This page owes thanks to Jarrod Dalton, a PhD
candidate in biostatistics at Case, for choosing this topic
for his class project in EPBI415 in 2010. Useful slides from his
project presentation are available here.
The following examples were taken directly out of the brew package:
Dr. Horner's useR 2007 example is more advanced than these:
#
See http://rapache.net/manual.html to setup RApache.
# On ubuntu 12.04
the following workedsudo apt-get install r-base-dev apache2-mpm-prefork apache2-prefork-dev
sudo wget http://www.rapache.net/rapache-1.2.1.tar.gz
# followed by tar xvzf, ./configure, make and make install as root
#
then add the following lines to /etc/apache2/apache2.conf
LoadModule R_module /usr/lib/apache2/modules/mod_R.so
<Directory /var/www/EPBI415/files11/wk12brew/H2R>
SetHandler r-script
RHandler brew::brew
</Directory>
REvalOnStartup "library(brew)"
and restart it
with
sudo /etc/init.d/apache2 restart