In an attempt to add a "download this timeseries as .csv` button, I tried accessing variables between R and python as described in the reticulate package docs.
This worked going from R to python using r.csv to get the filepath, but when I tried going from python back to R to "inline code" py$csv_linkthe build spat out a "object 'py' not found".
The best workaround here is to translate my python string-manipulation into R, but I also want to understand what went wrong.
Is this a bug with reticulate?
Do inline-code R chunks work differently and cannot access the py object?
:man_shrugging:
In an attempt to add a "download this timeseries as .csv` button, I tried accessing variables between R and python as described in the reticulate package docs.
https://github.com/marinebon/p2p/blob/2c09615a09709ffca431a135e4c1ceae9168f6d0/site_template.Rmd#L166-L183
This worked going from R to python using
r.csv
to get the filepath, but when I tried going from python back to R to "inline code"py$csv_link
the build spat out a "object 'py' not found".The best workaround here is to translate my python string-manipulation into R, but I also want to understand what went wrong. Is this a bug with reticulate? Do inline-code R chunks work differently and cannot access the
py
object? :man_shrugging: