Discussion:
idl and R
(too old to reply)
r***@hotmail.com
2008-04-04 09:26:28 UTC
Permalink
Hi

Does anybody have a summary of the major differences between R and
idl? I have been using idl for years and have never used R. I
understand R is statistics orientated, but does it do anything that
idl can't or does it do it better?

Thanks

Russ
ben.bighair
2008-04-04 14:58:47 UTC
Permalink
Post by r***@hotmail.com
Hi
Does anybody have a summary of the major differences between R and
idl? I have been using idl for years and have never used R. I
understand R is statistics orientated, but does it do anything that
idl can't or does it do it better?
Hi,

I have been using R for about a year - this is part of the plan in one
project to replace IDL with ImageJ and R as we move toward open
source software. I still use IDL extensively for other projects. I
haven't hit a real "comfort level" with R, but I have used it as a
general purpose language for working with text files - mostly things
that can be managed as data.frames (simple spreadsheet-like data
structures.) In IDL I had built extensive OO libraries around
handling vectors of simple structures that are quite analogous to data
frames in R.

I, too, thought of R as statistics oriented - and it sure has a lot
going for it in that realm - but my year-into-it-now sense is that it
is better to call it a general purpose language. Keep in mind I
haven't really had much formal training in programming.

Perhaps first and foremost - the user group around R, like this one
around IDL, is very helpful. It is also a lot bigger.

Second - library distribution is a snap in R. The base package of R
has a lot of stuff in it, but sometimes you need to import extra stuff
(like mapping tools for instance). I found it *incredibly easy* to do
so. (This is very much unlike my experience with Python on PPC Mac -
great software but what a mess adding SciPy libraries.)

One thing I haven't noodled out about R is object inheritance. In R
there are two distinct layers of object-oriented programming - the
oldish S3 and the newish S4 styles. I haven't been able to penetrate
the S4 paradigm which I gather is more akin to the OO paradigm in
IDL. So for now I have single files of multiple functions that accept
my data object as an argument. I really couldn't call that OO work
with a heap variable - there is a whole lot of copying arguments going
on. I really miss the simplicity of the IDL OO paradigm.

I haven't jumped into any GUI/Widget stuff with R. That kind of stuff
requires extra libraries (Tk/Tcl, Wx, etc.) which are easy to load,
but each has its own API. Recently a limited "gWidget" system has
been introduced for R that provides a consistent API regardless of
which widget toolkit the user chooses to use underneath. I think this
has the flavor of IDL's widgets (with Motif or Windows underneath) - I
hope to dive into that someday.

I don't pay too much attention to computing power things, but here is
a dated comparison of R with some other languages (but not IDL)...
http://www.sciviews.org/benchmark/index.html

Hope that is helpful.

Ben
George N. White III
2008-04-05 16:19:39 UTC
Permalink
Post by r***@hotmail.com
Does anybody have a summary of the major differences between R and
idl? I have been using idl for years and have never used R. I
understand R is statistics orientated, but does it do anything that
idl can't or does it do it better?
I use both IDL and R. The biggest advantage of R in my work is that
it provides NA values that are distinct from NaN. Most operations
have an na.rm option, e.g.

mean(c(1,2,3,NA),na.rm=FALSE) returns NA, but
mean(c(1,2,3,NA),na.rm=TRUE) returns 2

I've never been a fan of overloading NaN as a missing data value:
a) it can't be applied to integer data, b) there are times when
you need to know the difference between a computational error
and missing inputs. I've spent way to much of my life coding tests for
missing value flags, so I really appreciate a language that properly
supports NA values.

R has very solid plotting capabilities, but tends to bog down
when working with images. R (like Matlab, unlike IDL) tends to
coerce everything to doubles for calculations, but (unlike Matlab and
IDL) checks for NA add significant overhead for big calculations.

R is an implementation of the S-plus language. It has a large, active
user community. R is widely available and has a nice system to manage
packages (which are generally provided as binaries on Windows, sources
on *X).

In my work I often use IDL to extract data (e.g, time-series) from remote
sensing images and then use R to analyse the resulting data sets.
--
George N. White III <***@chebucto.ns.ca>
r***@hotmail.com
2008-04-07 10:25:27 UTC
Permalink
Post by r***@hotmail.com
Does anybody have a summary of the major differences between R and
idl?  I have been using idl for years and have never used R.  I
understand R is statistics orientated, but does it do anything that
idl can't or does it do it better?
I use both IDL and R.  The biggest advantage of R in my work is that
it provides NA values that are distinct from NaN.  Most operations
have an na.rm option, e.g.
mean(c(1,2,3,NA),na.rm=FALSE) returns NA, but
mean(c(1,2,3,NA),na.rm=TRUE) returns 2
a) it can't be applied to integer data, b) there are times when
you need to know the difference between a computational error
and missing inputs.  I've spent way to much of my life coding tests for
missing value flags, so I really appreciate a language that properly
supports NA values.
R has very solid plotting capabilities, but tends to bog down
when working with images.  R (like Matlab, unlike IDL) tends to
coerce everything to doubles for calculations, but (unlike Matlab and
IDL) checks for NA add significant overhead for big calculations.
R is an implementation of the S-plus language.  It has a large, active
user community.  R is widely available and has a nice system to manage
packages (which are generally provided as binaries on Windows, sources
on *X).
In my work I often use IDL to extract data (e.g, time-series) from remote
sensing images and then use R to analyse the resulting data sets.
--
Thanks very much for both responses. I have found them very useful.

Russ

Continue reading on narkive:
Loading...