[R] Compiling R in C / C++

Jordi jordi_molins at hotmail.com
Tue Nov 29 18:05:26 CET 2005


Andy,

What I tried with my previous email was to give an idea for future
development of R. I would love to be able to do the C++ / R compiler by
myself, but unfortunately for me, I do not have the technological knowledge
to put it into practice. 

Of course, I am really grateful to all R developers that give their code for
free. I should have stated that before, because I really feel it. I am a
humble R user. If you want to call the R users (as opposed to developers)
people who ask the developers to work for free, let be it. Definitely, it is
not the way I feel.

What I had in my mind is a suggestion for the R architects. I see that there
are several R GUIs floating around, that are very good ideas in themselves.
But extrapolating this to the limit, why not making R even GUI independent?
Why not extending the FREEDOM, not only in the code license, but also
escaping from the slavery of GUIs? Just have the functions and the syntax,
everything else is accessory.

It was only my intention to present these ideas. For sure more intelligent
people than me have already thought about this, and much more deeply. I just
wanted to recall that there are some simple users out there that would be
deeply grateful if they could use R as an extended library.

Again: thank you to all R developers for making such a great computing
framework.

> -----Original Message-----
> From: Liaw, Andy [mailto:andy_liaw at merck.com]
> Sent: Tuesday, November 29, 2005 3:21 PM
> To: 'Jordi'; r-help at stat.math.ethz.ch
> Subject: RE: [R] Compiling R in C / C++
> 
> Here are just some (probably not very coherent) rambling:
> 
> It's not very clear to me what you are looking for.  Are you looking for a
> tool that compile R code into a stand-alone application?  That's what the
> Matlab compiler does for Matlab code, but AFAIK is _not_ what C++/Connect
> or
> Java/Connect for S-PLUS does.  The latter two just provide means of
> calling
> S code from those two languages (and perhaps the other way around, too, I
> don't remember), if I'm not mistaken.
> 
> There has been some effort at creating a tool for compiling R code into C.
> See http://hipersoft.cs.rice.edu/rcc/index.html.
> 
> If I may say so, the tone in your message seems to suggest that you're
> simply asking people to do work for free.  (Are you willing to do that
> yourself?)  Open Source projects like R need efforts to go both ways.  If
> everyone just ask for new features and no one contribute, the project
> isn't
> going to get very far.  If you can not contribute code that you're asking
> for, perhaps at the very least you can contribute to the R Foundation.
> It's
> the least you could do for not paying whatever it was to get
> Matlab/Mathematica/S-PLUS but get to use R instead.
> 
> Best,
> Andy
> 
> From: Jordi
> >
> > I am interested in being able to use R in my own libraries,
> > written in C++.
> > I have seen that in the past several people have asked about this
> > possibility. In the book Programming in S it is stated that
> > it is possible
> > to call R functions from a C++ called from R. Also, it seems
> > it is possible
> > to do something with the R D-COM port, but at least for
> > somebody with my
> > limited capabilities (and time) this is not a feasible possibility.
> >
> >
> >
> > I have heard in the past days that both Matlab and
> > Mathematica have modules
> > that compile the whole code into C++. I think that S-PLUS
> > does something
> > similar with C++/Connect. Matlab is going to do something
> > equivalent with C#
> > and Java next year.
> >
> >
> >
> > These modules are pretty expensive (around 3,000 euros). A
> > question to the R
> > popes: wouldn't it be a good idea to do something like this for R?
> > Advantages:
> >
> > - Many people like the idea to use R as an extended library,
> > and not being
> > tied to a given framework, GUI, . even, some things cannot be
> > done with R
> > because they need to be implemented in a stand-alone basis;
> >
> > - "You have to run to stay in the same place you were"
> > (Alice): if other
> > frameworks like Matlab, Mathematica and S-PLUS do it, and if
> > R does not do
> > it, "we" are staying behind;
> >
> > - If this were implemented in R, the cost would be 0, adding
> > an advantage
> > over the other computing frameworks, where the cost of C++
> > compiling is much
> > higher.
> >
> >
> >
> > I guess that what I am proposing is easier said that done. I
> > imagine that
> > there are many technical problems. There are many other
> > interesting things
> > to develop. Time is limited. I know. I am being egoist: I
> > probably would not
> > contribute, but I would reap the advantages. I know. But I think the
> > proposal makes sense.
> >
> >
> >
> > What do people think about it?
> >
> >
> >
> > I was just thinking in posting this email in devel, but I thought the
> > general forum was better.
> >
> >
> >
> >
> >
> >
> > 	[[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
> >
> 
> 
> --------------------------------------------------------------------------
> ----
> Notice:  This e-mail message, together with any attachment...{{dropped}}




More information about the R-help mailing list