R: write a high quality GUI for an R project
I wrote a piece of R code that does numerical computation. Now I want to implement it in a nice GUI. I know there are some R packages out there that let you build GUIs from R (e.g. gWidgets, RGtk2, ...). However, they seem to be quite limited in capabilities and complicate assembly. So I thought about going the other way and writing a windowed program that includes my R code.
Is it possible to write a good GUI (in Visual Basic .NET or Java, for example) that allows you to collect some custom inputs, invoke R calculations, and display the results? I ask Visual Basic because there is a new R-Open that comes with Visual Studio, which makes me think they should offer natural ways to collaborate with each other. I also hope I can compile the exe with it at the end.
Many thanks for the help! Bernd
source to share
You can embed R into C ++ code. There are examples in the source code and documentation.
In short, you will need to create a generic version of the R DLL (that is, with an option --enable-R-shlib
) from source using Windows Tools . This is how GUIs like the RStudio feature work.
R The Administrator's Guide contains detailed instructions. The RInside package can make this a little easier.
With a shared DLL, you can probably embed R in other languages โโ(it works for R in Python ).
source to share