[R] Fortran vs R

Duncan Murdoch murdoch at stats.uwo.ca
Wed Sep 23 17:48:19 CEST 2009


On 9/23/2009 11:13 AM, Paul Simonin wrote:
> Hello R users,
>   I have a basic "computer programing" question. I am a student 
> currently taking a course that uses Fortran as the main programming 
> language, but the instructors are open to students using any language 
> they are familiar with. I have used R previously, and am wondering if 
> there is any benefit to my learning Fortran, or whether I should stick 
> with R for this class. Any advice? Are there clear benefits to using 
> Fortran, or things Fortran can do that R cannot?

They are very different languages.  For many things Fortran will be much 
faster than R: so much so that you might find R is too slow to use for 
some of your assignments. On the other hand, R has much better support 
for many high level things, so you will find it much easier to do some 
of those:  preparing graphs, etc.

My advice would be to use the class as an opportunity to learn Fortran. 
  Seeing things from more than one point of view is always a good thing.

This might not be relevant to this class, but it is possible to use 
Fortran to write functions which are called from R:  so you get the best 
of both worlds.  That's another reason to learn Fortran.

Duncan Murdoch




More information about the R-help mailing list