Brew package, rapache, not interpreted code for R

169 Views Asked by At

I have installed rapache, and created the r.load and r.conf files in /etc/apache2/mods-available. in r.conf I have placed the following lines.

<Locarion /R>
 SetHandler r-script
 RHandler sys.source
</Location>

And similary, for RApacheInfo. So far so good, because I have put files with R code inside / R and I can visualize the output in the browser.

But brew had problems, in r.conf for brew

 <Location /brew>
  SetHandler r-script
  RHandler brew::brew
 </Location>

And installed brew as follows

su root
R
> install.packages("brew")
> 127 

127 indicates the mirror, but I only downloaded it, then I had to put it

> install.packages('package.tar.gz', lib="/usr/local/lib/R/site-library", repos = NULL)

And then I put a file inside /brew with html code and R code as well.

<html>
<head>
 <title>R, HTML </title>
</head>
<body>
 <h3>Test R and HTML </h3>
 <p> rnorm </p>
 <%
 print(rnorm(100));
 %>
</body>
</html>

But it only shows output for HTML, the code for R is shown as text.

¿Why it's not interpreting the R code?

And as I install several libraries so they all work in /R.

0

There are 0 best solutions below