UsageError: Line magic function `%%R` not found.

Issue #602 new
D9821 created an issue

I am using Mac OS Catalina, PyCharm with Jupyter notebook. I am trying to pass a variable with %%R from python code

%%R -i variable
print(variable)

I receive this error:
UsageError: Line magic function `%%R` not found.

Python 3.7.5

rpy2 3.2.2

R 3.5.1

What can be the cause of this error and how can I fix it?

Comments (2)

  1. Michał Krassowski

    If you are new to rpy2 you may have forgotten to enable the R magic first, using:

    %load_ext rpy2.ipython
    

    If this is the case, I would recommend reading the following documentation pages: Interactive work and Using rpy2 in notebooks - there are many useful tips here! Also, you may get a faster response asking questions about usage on StackOverflow.

  2. D9821 reporter

    Thank you for replying, Michał.

    I have done that, actually. At the very beginning of the code. I will try StackOverflow too. Maybe I can get more answers there, thanks 🙂

  3. Log in to comment