Index dataframe in RCall's R macro


I am wondering if there is a way to index an R dataframe with RCall. I have the following scenario:

#some code
The problem is that $ is reserved in RCall for denoting a variable.


In my particular use case, I actually had a list that contained a dataframe. Nonetheless, the same issue with $ still applied. The solution I came up with was somewhat inelegant, but it might be the only workaround:[["element"]])

To access a column of a dataframe in the R macro, the following worked


There might be a more elegant solution, but these work with the R macro.