Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R statistics console in QT

Tags:

r

qt4

I am planning to link a Qt project against R to provide some statistical funcionality. I thought it might be quite cute to add some generality to the project by having an R console as a Qt widget within the tab to allow me to do analyses that I haven't thought of in the design stage later on. I was wondering whether it is something that might be accomplished fairly easily?

In particular I'm stuck on how I would access the RTerm from QT? Has anyone else attempted something similar or can give some hints on where to start?

like image 277
Bowler Avatar asked Dec 06 '22 16:12

Bowler


1 Answers

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

The example implements a GUI density slider, and the edit box allows you to write an almost arbitrary R expression, or rather the parts that are then passed into an evaluation to generate random number: rnorm(50), or for a mixture c(rnorm(50), rt(50)) etc. You could possibly build on top of that.

See this blog post for more.

like image 152
Dirk Eddelbuettel Avatar answered Dec 09 '22 04:12

Dirk Eddelbuettel