R in the QT console

I plan to link the Qt project with R to provide some statistical functionality. I thought it would be nice to add some generality to the project, having the R console as a Qt widget in the tab, to allow me to do analyzes that I did not think about at the design stage later. I was wondering if this is easy to do?

In particular, I was fixated on how to access RTerm from QT? Has anyone else tried something like this or can give some clues on where to start?

+4
source share
3 answers

One example of RInside does something pretty close - about 200 lines, most of which deal with other aspects of the GUI, it wraps R functionality inside a Qt application.

In the example, the density slider of the graphical user interface is implemented, and in the edit field you can write an almost arbitrary expression R, or rather parts that are then passed to the estimate to generate a random number: rnorm(50) or for the mixture c(rnorm(50), rt(50)) , etc. You could build on top of this.

See the blog post for more details.

+8
source

Check out Carson Farmer working on managing R:

http://www.ftools.ca/manageR/

it is a plugin for Quantum GIS (mapping package) that connects it to R, giving you exactly what you want - the R console wrapped in the Qt4 body, as well as the data transfer between Qgis and R. It handles the graphics as well.

I tried to encourage Carson to release the stand-alone R Gui project from this code, but he is a busy guy. Aren't we all?

+4
source

RStudio is mostly written using QT, you should be able to take a look at your code and create something similar in your Qt-based application:

https://github.com/rstudio/rstudio

+3
source

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


All Articles