PyThor- Python meets R(nipunbatra.github.io) |
PyThor- Python meets R(nipunbatra.github.io) |
Beaker has a feature "autotranslation" that converts the data between R, Python, JavaScript, Julia, Scala, Clojure, and many other languages, completely automatically. Learn more at http://BeakerNotebook.com
Breaker uses the same jkernel as IPython and backend of Jupyter.
R is really more a functional language which most people don't recognize and when they learn the standard core of R with Lisp inspired ideas it really throws them for a loop. I ended up learning Racket (after trying to teach myself Haskell 3 times) and I can say I now "get it," but using the new libraries has really made that point mute.
I love R and am excited to see all the support from Microsoft and other large companies jumping on board.
This does look like a decent way to move to Python though. If someone was to do that I hope they use Rodeo IDE.
Just to clarify, R was initially a dialect of Scheme. On the other hand, with its frustrating silent type changes, you can see its S roots in the same place that gave us C and C++. That's quite a combination in terms of learning curve.
In R, a Factor is also the bizarre result you get if you load a flat file incorrectly. Lots of things in R proceed without stopping on errors, and you end up with weird data that isn't really usable but still lets your program continue.
I think most users of Python are that... "users". But R is used by creators of algorithms who find it very easy to create and distribute code.
In fact a lot of them talk about how difficult it is to install packages in python, while any R script has "install.packages" right in it.
I'm willing to bet if Pandas/Numpy/Jupyter built a CRAN-PY and made the packaging system similar to R, the adoption would be much different.
Packaging is improving in Python afaik. People like Anaconda!
Going R to Clojure or Julia seems like a gain but Python.
You can see the available magics here: https://ipython.org/ipython-doc/3/interactive/magics.html#ce...
Unfortunately it looks like there is none for R or Julia, but perhaps they are installed by those specific packages, or their is some other way I don't know of.
If you can find an error in our implementation I would be happy to hear about it (ideally file an issue on github).
I am not an expert in R and I don't expect autotranslation to cover every case, but I think what we have is useful, and I look forward to continuing to improve it based on community feedback.
Thanks, -Scott
This is the package submission page to CRAN - https://cran.r-project.org/submit.html
This is the equivalent for Pypi - https://pypi.python.org/pypi?%3Aaction=submit_form
From a political perspective R was in the right place at the right time. It was a decent high level language that could handle matrix processing gracefully. Scipy/Numpy weren't ready for production yet. The others were Matlab, SAS, and Stata, all of which R makes look like APL.
I'm glad the field has a more healthy open source landscape with worthy competitors in the form of Julia and Numpy/Scipy.
R's biggest sin is failure to force people to use functional paradigms by providing juuuust enough imperative sugar to make average Joe programmer feel at home. R is a functional language, and that's the principle under which is should be taught.
That said, R also has a large number of main technical strengths:
1. Fast basic statistics within the REPL so you can test hunches quickly.
2. Cutting edge algorithms that often aren't implemented anywhere else.
3. Hugely strong engineering packages for civil, environmental, defense, aerospace and basically any IRL engineering field you can think of.
R comes free, with these advantages and many more for the average lab tech.
You have a very very narrow definition of scientific computing, excluding a huge part of the field, i.e. anything written in C, C++ or Fortran. And I've never seen people in aerospace or civil engineering use R, it seems to be mostly popular in statistics heavy, "softer" fields such as biology or economics.
Edit: to give some examples of what I mean: show me a (molecular dynamics|computational fluid dynamics|finite element method|Poisson solver|magnetohydrodynamics solver|electrodynamics solver|general relativity code|quantum many-body solver|lattice field theory code) written in R. I haven't seen any.
Molecular Dynamic - https://cran.r-project.org/web/packages/bio3d/index.html
computational fluid dynamics - http://search.r-project.org/library/rjacobi/html/xinterp.htm...
finite element method - https://cran.r-project.org/web/packages/RTriangle/RTriangle....
Poisson - https://cran.r-project.org/web/packages/isotone/isotone.pdf
And of course, R makes data exploration, statistics, and all those easier problems incredibly simple.
100% in agreement. That states what I have discovered after learning Functional programming.
The sad thing is people don't know that it is functional PAST first class functions. http://link.springer.com/chapter/10.1007%2F978-3-642-40447-4...
Compare it to other languages, lots of code is needed to convert the data from one format to another, because there's no underlying data structure (Python is much better than the rest with regards to that, but still not as good as R).
This is forgetting xlispstat, which was frankly the best of the lot. Free, functional (based on a subset of Common Lisp), and with dynamic graphics capabilities that R is now only beginning to match. But the problem I think was that it was maybe too early. In the 1990s, Lisp and functional programming seemed to be on the way out and object-orientation was the big thing (It's telling that the book on XlispStat is called "LISP-STAT: An Object-Oriented Environment for Statistical Computing and Dynamic Graphics", hyping the objects rather than the functional aspects). If it had come out now, with the current interest in FP/Lisp thanks to Clojure and Racket, it probably would have been more successful.
(and tbh, I would not call either SAS or Stata matrix programming particularly graceful -- it's pretty hard to beat Matlab at that though)
I'm not sure what that means, because a default R installation will always stop on an error.
> a Factor is also the bizarre result you get if you load a flat file incorrectly
That's user error. No programming language can catch that - it can only detect errors that are defined as errors.
People using default R installations report that special commands are needed to make it stop on all errors. Are they delusional? What about the R experts who give them solutions, are they doling out placebos?
This alone would make me run away very fast from R.
https://www.nas.nasa.gov/SC12/assets/images/content/Chaderji...
I'll certainly cede the point that there's a great deal of important scientific code in many languages that can't be accessed from R.
Yes, exactly this.