18

Is R an interpreted or compiled programming language?

nbro
  • 15,395
  • 32
  • 113
  • 196
AngryHacker
  • 59,598
  • 102
  • 325
  • 594

6 Answers6

22

The R FAQ says: "The core of R is an interpreted computer language".

nbro
  • 15,395
  • 32
  • 113
  • 196
Michael Kohne
  • 11,888
  • 3
  • 47
  • 79
11

It's more accurate to say that the default implementation of some language is interpreted or compiled. But not the language itself!

nbro
  • 15,395
  • 32
  • 113
  • 196
Wildcat
  • 8,701
  • 6
  • 42
  • 63
10

You can build a compiler or interpreter for any programming language. In general, the language itself is not compiled or interpreted.

So, R could be either interpreted or compiled. Nonetheless, in the most common implementation, R is interpreted.

nbro
  • 15,395
  • 32
  • 113
  • 196
DigitalZebra
  • 39,494
  • 39
  • 114
  • 146
9

R is an interpreted language.

nbro
  • 15,395
  • 32
  • 113
  • 196
NawaMan
  • 25,129
  • 10
  • 51
  • 77
3

R doesn't compile. There are projects that try to get it compiled: http://www.hipersoft.rice.edu/rcc/ , http://www.rforge.net/r2c/ but I can't find any currently supported.

That said, the performance on modern hardware seems reasonable for even larger workloads I have thrown at it (millions of records).

Godeke
  • 16,131
  • 4
  • 62
  • 86
  • Those aren't ready yet. See this related question: http://stackoverflow.com/questions/1452235/deploying-r-without-r-into-c-or-c – Shane Nov 04 '09 at 22:31
  • The folks at Revolution Computing (http://www.revolution-computing.com/) are working on a version of R that's supposedly a few times faster than the standard distribution. It's still interpreted, though. – John D. Cook Nov 04 '09 at 22:36
  • 1
    John, REvo R is still essentially the same R but it ships with MKL (faster blas) and (somewhat) easier parallel usage. The engine is identical for all intents and purposes. – Dirk Eddelbuettel Nov 05 '09 at 00:31
-2

R is definitely written in C. I asked myself this question alittle while ago, and resolved it by downloaded the source code from http://www.r-project.org/.

wespiserA
  • 3,131
  • 5
  • 28
  • 36