Skip to content
Prev 13505 / 63421 Next

R as shared library

For my prototype which already works, it's as simple as placing your code
in a .R file accessible from the web server. That means your R code is
responsible for generating HTML, similar to other languages embedded
into Apache like Perl and Python. PHP is different in that the interpreter
is only entered once a special tag is seen:

file.php
-------------
<html>
<body>
<?php  
 /* php code here */ 
?>
</body>
</html>
-------------

And you can jump into and out of the interpreter an unlimited number of times.
This allows for embedding parts of the HTML document within your code. Whether
or not this is a good thing is debatable.

The problem I'm working on right now, and which was talked about in the
previous emails, is how to expose the CGI data to the R interpreter. Another
part of this is how tight should R hook into Apache. Languages like Perl and
Python expose many different parts of the http request to be overidden by
language specific handlers, whereas PHP doesn't.

My intent is to release a proof of concept prototype and then work with the R
developer community to determine how it should evolve.

Jeff