I'm new to Jupyter notebook and I'm trying to set one up with Python and R, using rpy2. I have the line
%%R -i df
which gives me the error SyntaxError: invalid syntax
However when I use just one %, such as
%R require(ggplot2)
this works fine. How can I fix this issue? I am using Python 2.7.