Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » interface with R
interface with R [message #31675] Sat, 19 March 2011 13:16 Go to next message
typhoong is currently offline  typhoong
Messages: 6
Registered: March 2011
Promising Member
hi, i have written a lot of codes using the open source statistical package R.

i want to build a GUI using U++ and do the calculations using the R codes.

so i think i need some kind of "interface" or "library" so that U++ can communicate with R and vice versa.

can you tell me what i need and how i can find it??

i have already looked at the libraries of R provided but i cannot find anything useful.

thanks a lot.

graham

Re: interface with R [message #31678 is a reply to message #31675] Sat, 19 March 2011 18:41 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Graham

The Project R has GPL 2 license.

What features are you using from it?


Best regards
Iñaki
Re: interface with R [message #31710 is a reply to message #31678] Mon, 21 March 2011 07:37 Go to previous messageGo to next message
typhoong is currently offline  typhoong
Messages: 6
Registered: March 2011
Promising Member
hello koldo

thanks for reply but i do not fully understand the gpl license u mentioned. does that mean i cannot use R codes with U++??

i know this software
http://www.sander-partner.ch/en/mintfeatures.html

uses U++ for GUI and R for doing the calculation. And i am starting to think about doing similar things.

u asked the features i use for R, they are basic R codes and ggplot2 library for plotting graphs.

please advise.

graham
Re: interface with R [message #31711 is a reply to message #31710] Mon, 21 March 2011 08:27 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Graham

Quote:

i do not fully understand the gpl license

In summary it means that if you include R in a commercial program all your source code has to be public Rolling Eyes .

Quote:

i know this software
http://www.sander-partner.ch/en/mintfeatures.html

Oh, U++ application for Windmill is going to be widespread Smile.

What are R codes?


Best regards
Iñaki
Re: interface with R [message #31720 is a reply to message #31711] Mon, 21 March 2011 12:59 Go to previous messageGo to next message
typhoong is currently offline  typhoong
Messages: 6
Registered: March 2011
Promising Member
hi, I don't exactly what the R codes are but the company told me they use R to do the calculation and produce these plots:

http://www.sander-partner.ch/images/mint/BootStrap.png

http://www.sander-partner.ch/images/mint/HourlyCycle.png

http://www.sander-partner.ch/images/mint/Vertical.png

but on their home page, it does not say if you buy the software, they will making their R codes open, does that mean they are violating the license rules? or they have to make open if someone request it?

anyway, i am still trying to find the interface between ultimate++ and R, do you know?

graham


Re: interface with R [message #31721 is a reply to message #31720] Mon, 21 March 2011 13:46 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Graham,

I didn't read the web you linked to carefully, but AFAIK using R in this context can actually mean two things: 1) They are using some R C/C++/... interface or 2) they could be just calling external tools comming from R project. If you don't need some high-speed computing the second option is actually fine enough and it also bypasses the problems accompanied with using GPL licensed software.

If you desire to use C++ interface to R there is a project called Rcpp, which provides just that. It is probably the closest you can get to U++ binding. Unless you decide to write one yourself Smile (And even if you do that, looking at Rcpp code might be very helpful...)

Best regards,
Honza
Re: interface with R [message #31722 is a reply to message #31720] Mon, 21 March 2011 14:04 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Graham

They are probably doing it right.

Although R package is GPL-2, some header files are distributed under LGPL-2.1. (see http://www.r-project.org/Licenses/ and https://svn.r-project.org/R/trunk/doc/COPYRIGHTS):

- src/include/R.h
- src/include/Rdefines.h
- src/include/Rgraphics.h
- src/include/Rinternals.h
- src/include/Rmath.h
- src/include/S.h
- src/include/R_ext/*.h

LGPL license permits use in proprietary programs calling the code through dynamic libraries (dlls in Windows).

If the functions you need are fully in .h files, probably their integration in U++ will be very easy, just adding the #includes.

Make a simple test and be sure that all .h files are accessible in TheIDE Setup/Build methods/Include directories.


Best regards
Iñaki
Re: interface with R [message #31723 is a reply to message #31722] Mon, 21 March 2011 14:05 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
And about plots, if you do not need very special ones, they can be added to Scatter.

Best regards
Iñaki
Re: interface with R [message #31732 is a reply to message #31675] Tue, 22 March 2011 05:02 Go to previous message
typhoong is currently offline  typhoong
Messages: 6
Registered: March 2011
Promising Member
koldo and honza,

thanks for all the tips, i will give it a try !

graham
Previous Topic: A little bug in the Scribble example program
Next Topic: HelloWork - undefined reference to symbol 'FT_New_Face'
Goto Forum:
  


Current Time: Fri Mar 29 15:20:14 CET 2024

Total time taken to generate the page: 0.01476 seconds