I have installed ir kernel in my conda environment. I am using the R kernel for the notebook. But I am unable to simulate the interplay between R and python as I did in the R markdown notebook using knitr.
Now, when I have used Rmd in RStudio, I could do the following:
```{python}
import numpy as np
a = np.zeros(5)
```{r}
b = py$a
c = b**2
```{python}
c_r = r.c
P.S there is an ``` at the end of each python and R block to end them, but it's not showing here.
Now how I am doing the same in the jupyter notebook with the R kernel, and it's throwing errors. I know about using rpy2 and %%. But that requires the kernel to be a python one. Is there any way I can do the above using an R kernel? I have also tried using jupytext and paired the notebook with R markdown, but that didn't help. Maybe its something very simple, that I am not being able to see. Please help.