[R-gui] Embedding r

Simon Urbanek simon.urbanek at r-project.org
Sun Dec 21 06:51:47 CET 2014


Jodi,

there is no "best" way in general, there are so may different ways that it really depends on your application and your comfort with the tools involved.

First, the fundamental setup:
a) direct embedding (linking libR, examples: R.app GUI, JGR, ...)
b) indirect embedding (UI separate from the R process. examples: RStudio, RCloud, ...)
c) UI over R process (ESS)

For a) your application is directly linking to R and running the interpreter. It is the technically most involved solution, because you need to obey all the rules imposed by the setup, but on the plus side you have the most control. With power comes responsibility. It's also the easiest to crash R ;). The R embedding API is what you would use (C) or one of the wrappers such as RInside (C++), JRI (Java) or REngine (ObjC).

b) is more safe since it isolates your application for R so your application is less impacted by the constraints R imposes. On the other hand it limits some interactions since your application will be running in a separate process. It is also easier to use since you only deal with the API created by the interface. Examples of this separation are RStudio (HTTP/WS) and Rserve (Java, PHP, Ruby, WS/JavaScript).

c) This is the most trivial solution - technically not embedding - where you're simply driving the R process from another process without any additional protocol. I'm only mentioning it because there are GUIs that use this for simplicity.

Once you select the fundamental model for your application you will probably zone in quite quickly on the tools, since the space is mostly partitioned by the language of the interface (C, C++, Java, ...).

Cheers,
Simon


On Dec 20, 2014, at 5:55 AM, Jodi Jhouranda Siregar <11.6729 at stis.ac.id> wrote:

> My team developing r gui especially for spatial data analysis. We have some
> problems to dicided how to embed R in our software. We learn about Rcpp,
> rkward mechanism to emmbed r and other stuffs. But still, we can't jump to
> any conclusion what is the best way to emmbed R in our software. Hopes you
> guys give us advises regarding this problem.
> Regards,
> Jodi jhouranda siregar
> Statistical university
> Faculty of computational statistics
> Jakarta,indonesia
> Www.stis.ac.id
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-GUI mailing list
> R-SIG-GUI at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-gui
> 



More information about the R-SIG-GUI mailing list