inst/tools/listMethods.R

### additional methods for the list_Python proxy class

list_Python$methods(
    el = function(i, .ev = XRPython::RPython(), .get = NA) {
        'Extract an element from the list (zero based indexing).
The index will be coerced to integer (unless a proxy).'
        if(is.numeric(i))
            i <- as.integer(i)
        .ev$Eval("%s[%s]", .self, i, .get = .get)
    }
)

Try the XRPython package in your browser

Any scripts or data that you put into this service are public.

XRPython documentation built on May 2, 2019, 9:33 a.m.