R Notebook (R & Python Chunks)

Project Description

For data analysts, notebooks are a powerful way to document code, display output and describe stories in the data. R and Python are two of the most popular data science languages each with its own merits and weaknesses. As an analyst who uses both languages there are times when you wish to cherry pick functions or data structures from one of the languages, while working in a notebook which principally supports the other.

RStudio as the name suggests principally supports R, while Jupyter Notebook (usually associated with an Anaconda installation) focuses on Python. Jupyter Notebook is a great product complete with “magics” for running R code inline, but I will focus on RStudio here as its new preview release has introduced an exciting feature.  RStudio notebooks can now run Python chunks and provide Python objects back to the user to process in R!

Download (PDF, 309KB)

Project Details

  • Question:Can RStudio Version 1.2 process Python chunks in a practical manner?
  • Answer:Yes! RStudio/reticulate has made great strides in creating a truly agnositc notebook.
  • Challenges:Successfully producing and getting faceted graphics (Python) to display inline.
  • Purpose:Test the practicality of using both R and Python from chunk-to-chunk in RStudio.


Leave Reply

Your email address will not be published. Required fields are marked *