Skip to main content

Pretty Good Hat

Python + R in Quarto

I’ve been using Quarto for just about everything I can for the past year, advocating for it enthusiastically with anybody who will listen, but today was the first time I started experimenting with combining python and R in a single Quarto document.

Look, I’m somewhat on record as not liking jupyter notebooks. I don’t like how the file format requires an interpreter, which I feel hurts readability and portability. So I’m predisposed to really like something that reduces that friction, and, wow — python in Quarto hits it.

And passing data, interactively, between R and python kernels within a single interface of a Quarto document? That’s mind blown meme territory right there. It might motivate me to learn more python in an environment I like to work, and should also be a great gateway to go the other way: The python to R pipeline! I’m envisioning some learning and tutorial work that takes advantage of both approaches, just deeply excited about what it opens up for doing data work and data people.

See more: Nicola Rennie’s post is a great overview, and I also learned from Danielle Navarro’s writeup of using reticulate.