I have created a RMarkdown document with some objects in a Python code chunk. I'd like to be able to see these objects in the Environment window list in RStudio like the objects created in a R code chunk.
For instance, if I create a vetor, say:
a = c(1,2,3,4,5)
in a R code chunk (i.e. if I wrap the code with {r}
, it will appear in the Environment window list.
On the other hand, if I create another vector in a Python code chunk, like the one below:
b = [1,2,3,4,5]
b will not be listed in the Environment window. At least, I was not able to find a way to have it shown there.
On the other hand, b can be accessed in a R code chunk by prefixing it with "py$" like "py$b"
Is there a way to achieve this?