Equivalent to $ in rpy2?

A simple question that I can not find the answer to. How to get R object attribute in rpy2? For example, what is equivalent to the R-code: m$eval in rpy2?

+4
source share
1 answer

For lists, R $ equivalent to [[ with a vector of length 1: foo$bar equivalent to foo[["bar"]] . With rpy2, it will be foo.rx2('bar') or foo[foo.index('bar')] (see extracting an element, style R ).

+3
source

Source: https://habr.com/ru/post/1486294/


All Articles