When working in an R Notebook:
If I define a variable in an R chunk it is added to the global environment and is accessible to all other R chunks.
```{r}
a = 1 + 4
a
```
However, I haven't been able to pass the variable into a Python chunk or to access R's Global Environment from Python, even using rpy2.
```{python, engine.path="/anaconda/bin/python"}
import rpy2.robjects as robjects
a = robjects.r['a']
print(a[0])
```
Is there a way to do this? If not, I don't see the point of using a non-R language in an R Notebook. I could use Magics in Jupiter Notebook but that doesn't seem as easy.