Deploying R Application with GUI

I developed an R application and I want to deploy it.

Currently, the application consists of a set of functions that should be launched from the command line, for example, an R-package. To deploy it, I am considering repackaging R Portable by adding the necessary libraries and my code to it. My main problem is choosing the right GUI toolkit.

Work environment

My application is single-user (i.e. desktop application) and the target platform is Windows. It could load into R, and then call the toolbox, or load, for example, into Java, and then call the R. mechanism. The GUI should first serve the application functions. It should also capture the graphical output of the function.

Possible alternatives

Here is a potential list of alternatives. An identifier would like to know if they match / match the required description of environement.

Java JRI is now only released as part of rJava , but while the latter is clearly documented, I cannot find documents and tutorials for the former. As for Deducer , it is presented as a GUI interface, but I found that it is also a GUI toolkit

TCL / Tk bindings seem like a natural choice for R and are well documented, but someone complains about the limitations of this toolkit. RGtk2 seems interesting, and there are also some lessons. gWidgets is one of the rare tools for package virtualization!

Despite the fact that I do not need a real web application, an interesting option would be the interaction of R with JavaScript / HTML. Like most of us, I am familiar with this environment, and the application can benefit many JS libraries. The problem is the beautiful Brilliant Server and rApache for Linux, and this is probably probably probably Concerto . Instead, Rserve works on Windows, and although there is no official JS client, I found third-party rserve-js as well as node.js. Rook , the same author of rApache, must be platform agnostic (right?). R Server Pages may work, but I did not find examples in the HttpDaemon and HttpRequest functions in the vignette or reference manual. I am running some simple examples with gWidgetsWWW . It works, but it seems to create canned web pages without the ability to modify HTML code.

EDIT

Let me clarify my question. I do not consider your personal preferences. The technologies or products mentioned here are usually very young and not widespread. It would be very unpleasant to find after investing months of code that they are not yet ready or not suitable for production. Therefore, I would like to know (not your subjective tastes, but) if they can work in the environment described above.

+4
source share
2 answers

We created a kind of webapp-building on rApache and Ruby on Rails along with some other technologies at rapporter.net - it turned out to be the basis for placing R-based statistical applications in the Rapplications tools instead of our original goal of creating a user-friendly online interface for R I would warmly suggest checking our capabilities, since you could save a lot of resources without dealing with server, CMS and other boring problems, but you could focus on a statistical tool.

In any case, in addition to promoting our material, let me summarize my impressions:

  • rApache is definitely ready for production, but keep in mind that it’s only for fairly stateless algorithms (by default, Apache runs a group of workers so that the same user / client can interact with different R-sessions in each request). For instance. RServe would be a better alternative for a stateful application.
  • AFAIK A brilliant server is designed to host specialized statistical tools and applications - just like our Rapplication service with or without a database backend - with some custom user input. You will need some technical skills to do this, and too many additional resources may be required to provide an (HA) environment. This can be a huge advantage or disadvantage based on your requirements and expectations.
  • The biggest problem in this matter should be security (for example, using RAppArmor or sandboxR ), and not just the R-connector connector, as users will interact with your servers (if they are located in the cloud). Desktop applications are a bit more developer friendly, but support for all major platforms in the era of tablets and smartphones may be no-no. The cloud application can work on any device with a browser.
  • You must choose the best solution based on your requirements. There are many tools ready for production, and each of them has its own advantages and special use cases. Just check which related packages / applications are still under development with support, and answer a few questions, such as:
    • Do I need to connect to databases?
    • What types of user input are needed (for example, only parameters, data sets, R commands)?
    • Desktop / cloud application? Are you sure? If later, would you like to take care of configuration, maintenance and support?
    • Do you do any computationally intensive tasks?
    • Do you want to implement an application to help users with repetitive and standardized tasks, or rather provide fairly general and extensible software?
    • Do you need a flexible application with interactive configuration or use for reporting purposes?
    • What output formats do you need?
    • What other technologies do you know? It was quite difficult to create a Meteor-based application with NoSQL back-end if you worked with MySQL, PHP, Java or C # in the past.
+3
source

I'm going to do something like this. The fastest way (for both deployment time and future application performance) appears to be c# mating with R via R.NET . In Visual Studio you get incredible visualization capabilities in just a few clicks, as well as setting up interactive / tree diagrams, which is also quite simple. As you mentioned, RServe (with Java ) is another valuable option.

EDIT

If a web application does not need to run a public IP address, r Rook is an interesting option. Rook example: using ggplot2 , using googleVis

+1
source

Source: https://habr.com/ru/post/1486448/


All Articles