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)
    }
)
johnmchambers/XRPython documentation built on April 8, 2024, 2:46 p.m.