I use mostly python + jupyter in my research--in this case astronomical data science--workflow. One challenge I have been facing recently is dealing with time series. Some of the routines I need to use were written in R. There are versions of them for python but they seem to be inferior. The question then is: is it possible to easily interface with R functions from inside a jupyter python notebook? The answer is--amazingly--yes!
To illustrate how easy this is, I create a jupyter notebook available on Gist. This notebook demonstrates how to:
To illustrate how easy this is, I create a jupyter notebook available on Gist. This notebook demonstrates how to:
- generate some simple mock data with python/numpy
- import that data on R
- perform a linear fit using R's methods and load the results back to python
- plot the R fit with python
This may sound complicated but it really isn't.