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 to setup RApache. 
#  On ubuntu 12.04 the following worked

sudo apt-get install r-base-dev apache2-mpm-prefork apache2-prefork-dev
sudo wget
# 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/

<Directory /var/www/EPBI415/files11/wk12brew/H2R>
      SetHandler r-script
      RHandler brew::brew

REvalOnStartup "library(brew)"

and restart it with
sudo /etc/init.d/apache2 restart