%load_ext rpy2.ipython
Let's try a python block
def test(x):
return x * x
test(2)
And a ggplot test
%%R
suppressPackageStartupMessages(library(ggplot2))
We'll use an old friend
%%R
head(mtcars)
and plot it:
%%R
ggplot(mtcars, aes(wt, mpg)) + geom_point() + ggthemes::theme_fivethirtyeight()