datacamp / datacamp_facebook_live_intro_to_tidyverse

DataCamp Facebook Live Code Along Session 5: Learn how to to use tidy tools in R, such as dplyr and ggplot2, to intuitively explore & analyze your data.
MIT License
38 stars 34 forks source link

Live coding R in Jupyter NB #2

Closed hugobowne closed 6 years ago

hugobowne commented 6 years ago

In these live coding sessions, I generally use Jupyter NBs. This is so that i can include images, markdown and more between code chunks.

See examples here and here.

But, of course, all the coding sessions so far have been in Python.

I could use an R kernel to use a Jupyter NB for this Intro. to Tidyverse session.

@dgrtwo, what are your thoughts on this?

cc @gabrieldes

dgrtwo commented 6 years ago

You should use R Markdown in RStudio! Works very similarly and gives you basically all the functionality of Jupyter notebooks, including previewing code output in the doc. And it knits into markdown so you can share with text, images, etc between the chunks.

Cheat sheet on R Markdown Landing page on R Markdown for RStudio

I can show examples. I'd recommend this over Jupyter so that non-Python people who take it are pointed in RStudio's direction.

hugobowne commented 6 years ago

Agreed. I've used R Markdown a lot some years ago, e.g. here

I never found that it worked as well as Jupyter NBs for Workshops as in NBs you can do everything in line w/out having to be concerned about viewing previews etc...

Perhaps RMarkdown has changed in the meantime. Let's discuss

dgrtwo commented 6 years ago

Yep R Notebooks support showing the printed and image output right in the doc, you don't have to knit it into a preview or anything. In fact since about a year ago they have a rather attractive table output.

image

You can do a lot of configuration depending on your preferences (I actually like the output to appear in the terminal and plot window rather than in the document, since it crowds out the writing), so talk to me if you need to adapt it to your workflow!

hugobowne commented 6 years ago

thanks, Dave, this is wildly helpful. I'll let you know once I look into it.

hugobowne commented 6 years ago

ok done. using an R project and R notebook in RStudio RRRRRR :D