3 ms·
I wonder - could R in theory be rewritten as a Python library? If not, why not? Is there any special syntax of R that makes it more amenable to statistical anal
by eliben 16y ago
I wonder - could R in theory be rewritten as a Python library? If not, why not? Is there any special syntax of R that makes it more amenable to statistical analysis than Python? Performance concerns?
It's just a shame to see a whole language popping out of something that could just be a library.
- EventHorizon 16y agoR is an implementation of S. According to http://en.wikipedia.org/wiki/S_%28programming_language%29 http://en.wikipedia.org/wiki/S_%28programming_language%29 it has its origins in 1975.
- boothead 16y agoYou mean like numpy/scipy/matplot lib?
- cdavid 16y ago[caveat: I am a numpy/scipy developer] The idea of rewriting a large body of code in a different language does not make much sense. Also, being a niche language has some nice consequences: * R has been there for a long time through its predecessor S * R is a specialized language: little chance to see it being screwed up by some library which wants to change everything, as it happens too often in python * Because it is a niche language, its behavior is consistent across platforms (it is just easier to do with R than with python, or other "real" languages). Note how being a "real" language goes against those advantages. Also, most researchers are very lousy programmers. Often, their software is super smart, but the code quality is awful and write-only. A less powerful language may mitigate those issues
- hadley 16y agoWould love to know why you think R isn't a "real" language.
- lazyfunctor 16y agoSomething like that exists for clojure. http://incanter.org/ http://incanter.org/ "Incanter is a Clojure-based, R-like platform for statistical computing and graphics."
- mbreese 16y agoI've called out to R libraries before using rpy/rpy2. These have made it pretty easy. Then I can work with my data in Python, but when I need to use a stat function, I can just call out to R.
- equark 16y agoThere are a few issues. For me two of the most basic are 1) the lack of a ubiquitous NA across all data types and 2) lack of 754 floating point behavior. The lack of custom infix operators is also a bit painful, especially if you view matlab as a competitor. The unquoted formula type is also nice, although you could get some of that by parsing strings.