Skip to content

IDE for R C++ package writing ?

16 messages · Sean Davis, Brian Ripley, Henric Nilsson (Public) +8 more

mel
#
Dear all,

I have to develop a (hopefully) small package for R in C++.
I didn't code in C++ for some years, and i'm now searching
for an adequate IDE for this task.

Some of my criterions : not proprietary, not too heavy,
open to linux, not java gasworks, still maintained, etc

After looking on several places
http://en.wikipedia.org/wiki/List_of_C%2B%2B_compilers_and_integrated_development_environments
http://www.freeprogrammingresources.com/cppide.html
+ R docs
I was thinking on code::blocks, and emacs (and perhaps vim)

Emacs seems used by some R developers as an R editor.
So i did think on emacs because it could perhaps be interesting
to have the same editor for R code and C++ code.

However, when looking at the last emacs windows version,
it seems to date from january 2004 ... (dead end ?)
ftp://ftp.gnu.org/pub/gnu/emacs/windows/

I will be grateful for all advices on this tool topic.
Better choosing emacs ? or code::blocks ?
or another idea ?
Does somebody have an idea about the most used IDEs for
R C++ package writing ?

Thanks
Vincent
#
On Friday 23 February 2007 05:49, mel wrote:
Emacs is quite nice, as it has a package for R integration called ESS (emacs 
speaks statistics).  I do not use a GUI on Mac or Linux and just use 
emacs/ESS for running R as well as coding.  

IDE's such as Kdevelop, Eclipse, etc., have a lot of enterprise-level tools 
like automatic makefile generation, etc., but emacs works fine for me and 
what I do.

Sean
#
You seem to mention both Linux and Windows.

Emacs and XEmacs are both stable on both platforms, and I think most R 
developers use an emacs or vi variant for all their programming.  I would 
not call emacs an IDE, but the main thing I find useful is to have a 
language-aware editor (syntax highlighting, indentation ...).

If you write a package you will also need an Rd editor, and emacs/ESS is 
probably the best supported of those.

Later versions of precompiled emacs for Windows have existed, but I am 
running 21.3.1 (2002) on Windows and 21.4.1 on Linux: emacs itself is very 
stable.  If you prefer a more graphical environment, XEmacs is a good 
alternative and despite its name has an active Windows version.
On Fri, 23 Feb 2007, mel wrote:

            

  
    
#
On Friday 23 February 2007 11:49, mel wrote:
Dear Vincent,

I wouldn't let the date of 2004 scare you away from emacs. And, if I 
understand, in windows you can also use xemacs and/or emacs. 

One extremely nice feature of using Emacs is using the very same editor for R, 
C, C++, or anything else for that matter. It certainly fits your other 
requirements
Good luck!

R.

  
    
mel
#
Thanks for those first answers.
Indeed i forgot to precise that i'm currently working
on windows (but would like to be able to evolve to linux).
#
Den Fr, 2007-02-23, 11:49 skrev mel:
Not a dead end:
Emacs development has continued and version 22 is due RSN. For Windows
users, I'd recommend EmacsW32 and binaries of the patched Emacs available
from http://ourcomments.org/Emacs/EmacsW32.html. The binaries are current
(22.0.93.1 last time I checked) and the provided EmacsW32 extension offers
quite a few goodies.


HTH,
Henric
#
I don't know if ess runs under xemacs, but historically,
xemacs (a fork of the emacs code) had windows support earlier than
gnu emacs did, and obviously, it is still being worked on
as the last version is December 2006.

http://www.xemacs.org/Download/win32/

HTH
mel wrote:
#
Le Vendredi 23 F?vrier 2007 05:49, mel a ?crit?:
So, many other people told you that Emacs is a good choice. If you want to try 
it out, I also maintain a modified version of GNU Emacs that is simple to 
install and works with ESS and the latest version of R out of the box:

	http://vgoulet.act.ulaval.ca/emacs

Please note that the bells and whistles of EmacsW32 are not included. It is a 
plain GNU Emacs 21.3 with AUCTeX, ESS, Aspell and other minor enhancements 
thrown in.

HTH
#
In addition to Prof. Ripley's comments, which I wholeheartedly support,
I might point you to some additional tools, that enhance the use of
Emacs for coding.

I am running Emacs (alpha version 23 from cvs source) under Linux and
while I do not do C, C++ or FORTRAN coding, these tools have
dramatically improved my coding productivity when using R and Sweave (R
+ LaTeX) along with ESS and other standard Emacs tools such as
Auctex/Preview-Latex.


1. ECB - Emacs Code Browser

  http://ecb.sourceforge.net/


2. psvn - A Subversion interface for emacs

  http://www.xsteve.at/prg/vc_svn/


Both of the above, especially if you integrate version control using
Subversion, greatly enhance the functionality of Emacs as an IDE.

HTH,

Marc Schwartz
On Fri, 2007-02-23 at 11:17 +0000, Prof Brian Ripley wrote:
#
On Friday 23 February 2007 15:52, Marc Schwartz wrote:
Just a minor addition to Marc's comment: if you edit Python code, you might 
experience short, but frequent, freezes of Emacs that are related to a 
problem with semantic (a package on which ECB depends). I've not seen these 
with R (or C/C++ or LaTeX).

With that minor caveat, I find ECB is a great tool that works out of the box 
with R.

Best,

R.

  
    
#
I have used ess under Xemacs on Windows.  I think John Fox still has some documents and files available on the web for setting up Xemacs with ess.  You can try searching the R-help archives or probably even just google Fox and Xemacs.

Hope this is helpful,

Dan Nordlund
Bothell, WA  USA
#
Emacs has IDE capabilities possible, as extensions.   See the CEDET library 
and ECB package extension for code browsers, UML tools, etc.  JDEE (Java 
development environment for Emacs) is an excellent IDE for Java, SLIME is 
excellent for Common Lisp, but there isn't a truly excellent tool for C++ or 
R at this time.  (ESS IMHO is as good as it gets at present, but let's 
reserve the term "excellent" for things that deserve it, having stood the 
long test of time and design standards, like Emacs and Common Lisp have).

best,
-tony

blindglobe at gmail.com
Muttenz, Switzerland.
"Commit early,commit often, and commit in a repository from which we can 
easily
roll-back your mistakes" (AJR, 4Jan05).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-devel/attachments/20070224/7469d4db/attachment.bin
1 day later
mel
#
First, great thanks to all for all the answers.
I confess i was a bit scared about (re)learning a possible
tomorrow obsolete tool.

I'm however quite astonished nobody proposes another tool.
Do 100% R package developers use emacs ?

Anyway, given the answers, it seems i'll go on emacs or xemacs.

Thanks for the guidance.
Vincent
#
On Monday 26 February 2007 16:51, elw at stderr.org wrote:
You kidding, right? (I mean, maybe lots of people do that, but maybe that 
ain't such a good idea :-).

R.

P.S. Whether or not emacs + ess + ecb + a whole bunch of other things is or 
not a "real IDE" (whatever that means) I think is tangential to the original 
question. The issue, if I understand, are editing tools that will make the 
editing et al. simpler. So
No. Not 100%. But you said you'll be using Windows but want to move to 
GNU/Linux. Then, you might want to use the very same tool over a range of 
OSs, or regardless of whether you are in front of your workstation, or 
accessing it over a slow modem connection, etc. In such cases, Emacs is an 
excellent choice. Or one of the very, very few. In addition, I think you are 
seeing an example of  "once you try emacs, you often realize that other 
choices do not really offer you all that much, but you loose a lot". 

HTH,

R.

  
    
#
Plenty of folks don't use an IDE at all.  Copy/pasting working bits of 
code from your .Rhistory into a working file is a very useful tactic...

--e
#
Ya, copy/paste from .Rhistory is pretty common.  Especially among newbies 
and oldsters who dislike IDEs.  :)  [I got burned by Borland, way back 
when, and basically can't stand "wizards" and the like now...]

Looks like someone wrote a "send-to-R" plugin for vim last year:

http://www.vim.org/scripts/script.php?script_id=1048

--e
On Mon, 26 Feb 2007, Ramon Diaz-Uriarte wrote: