113 points · by nipun_batra · 10y ago · 55 comments
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.
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.
Going R to Clojure or Julia seems like a gain but Python.
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.
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.
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'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.
This alone would make me run away very fast from R.
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!
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