Hello, I am interesting in using R from a web application, for basic statistics and plots. The server is Java-based (tomcat). The simplest solution is a system call that generates the text or the image, then the servlet forwards the output. This can be done from any language, but it is quite inelegant and slow for the initialization time. Is there any package or approach for accessing R from a Java servlet you can suggest? Thanks in advance for any suggestion. Regards, -Marzio -- http://marzio.sala.googlepages.com [[alternative HTML version deleted]]
Hi Marzio,> I am interesting in using R from a web application, for basic statistics and > plots. The server is Java-based (tomcat). > The simplest solution is a system call that generates the text or the image, > then the servlet forwards the output. This can be done from any language, > but it is quite inelegant and slow for the initialization time. > > Is there any package or approach for accessing R from a Java servlet you can > suggest?The biocep project might be a good match, see http://biocep-distrib.r-forge.r-project.org/doc.html HTH, Tobias
Hi Marzio -- "Marzio Sala" <marzio.sala at gmail.com> writes:> Hello, > > I am interesting in using R from a web application, for basic statistics and > plots. The server is Java-based (tomcat). > The simplest solution is a system call that generates the text or the image, > then the servlet forwards the output. This can be done from any language, > but it is quite inelegant and slow for the initialization time. > > Is there any package or approach for accessing R from a Java servlet you can > suggest?The FAQ has a section on R Web Interfaces http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces include R/Apache and RServe. There is also Bioconductor's RWebServices, http://bioconductor.org/packages/2.2/bioc/html/RWebServices.html which produces soap-based web services from (strongly-typed) R packages. Martin> > Thanks in advance for any suggestion. > > Regards, > -Marzio > > -- > http://marzio.sala.googlepages.com > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793
Hi, Take a look at the rJava package. It includes JRI that lets you call R from Java. From the README:> This package contains code that is necessary to run > R as a single thread of a Java application. It provides > callback that make it possible to run R in REPL mode > thus giving the Java application full access to the > console. > > Currently the API is very, very low-level, comparable > to the C level interface to R. Convenience methods for > mid to high-level are planned, but not implemented yet.Good luck, Lars Marzio Sala wrote:> Hello, > > I am interesting in using R from a web application, for basic statistics and > plots. The server is Java-based (tomcat). > The simplest solution is a system call that generates the text or the image, > then the servlet forwards the output. This can be done from any language, > but it is quite inelegant and slow for the initialization time. > > Is there any package or approach for accessing R from a Java servlet you can > suggest? > > Thanks in advance for any suggestion. > > Regards, > -Marzio > >