Quantum Bayesian Networks

February 11, 2017

R are us. We are all R now.

Filed under: Uncategorized — rrtucci @ 5:08 pm

I have long been an enthusiastic proponent of R, a computer language designed for doing statistical analysis. In fact, 7 years ago I wrote a post in this blog entitled “Addicted to R”.

Our company (artiste-qb.net) has been publishing software written mostly in Python. The Python ecosystem includes a very nice statistical package called Pandas, whose authors profess much love for R and unabashedly admit that they were trying to copy the best of R’s statistical functionality and bring it to Python users. This is fine and good, but is not enough, is it?

R has been around for a long time (since 1993 according to Wikipedia), and during that time it has managed to accumulate a formidable number of highly useful extension packages and a very large and passionately committed community of fans. As good as Pandas is, it would be a pity and outright foolish if our company and others in the same boat ignored R’s rich libraries and numerous users.

So I was elated when Tao Yin, a member of our company, introduced our company members to rpy2 and its extension Rmagic. Rmagic allows one to invoke R functions inside a Jupyter notebook running with a Python kernel. So in a single Jupyter notebook, you can call both Python functions and R functions in the same cell, or have some cells running just R and others running just Python. And of course, variables can be exchanged easily between R and Python within that notebook. So we are all R now. And Python too.

I’ve only known about Rmagic for about a week so I’m a newbie at it. Fortunately, even though rpy2/Rmagic is very sophisticated software under the hood, it’s API (Application Programming Interface) is quite simple and intuitive. I wrote a Jupyter notebook called “Rmagic for dummies” that I hope will convince you that Rmagic is very powerful yet easy to use.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: