[BioC] Calling R from php
hpages at fhcrc.org
Wed Jun 8 22:03:29 CEST 2011
This question is probably too general for this list. Remember that this
is the Bioconductor mailing list ;-) You might want to ask to the
rApache people directly or maybe try the R-help mailing list instead.
On 11-06-07 10:50 AM, Fahim Mohammad wrote:
> I am trying to give user interface to my tool and willing to call R from
> php. I am able to install, configure and run the example given on
> rapache manual website http://rapache.net/manual.html and I suppose it is
> working perfect.
> I have a couple of varibles in php (such as input file path and other
> variables) that I want to send to R. The manual mentions how to call an R
> file but I could not figure out how to pass arguments from php (post
> variables) to an R file or R functions.
> # test.php file
> $var1 = "cat";
> $var2 = "dog";
> $geneArray = "";
> $inpFile = "/home/fahim/webRugit/dataFile.php";
> $processComplete = 0;
> $processComplete = howToCall($var1, $var2, $geneArray, $inpFile); // How to
> communicate? How to invoke the R
> #R file to be called (Filename: test.R): Function name is foo.
> foo ( $var1, $var2, $geneArray, $inpFile) ) // How to receive the variable.
> #http.conf file. //What to modify in this file
> ServerName localhost
> LoadModule R_module /usr/lib/apache2/modules/mod_R.so
> <Location /rapachetest>
> SetHandler r-handler
> RFileHandler /home/fahim/webRugit/hello.R
> Do I need to modify any other file???
> Thanks a lot.
> [[alternative HTML version deleted]]
> Bioconductor mailing list
> Bioconductor at r-project.org
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: hpages at fhcrc.org
Phone: (206) 667-5791
Fax: (206) 667-1319
More information about the Bioconductor