MCPcopy Create free account
hub / github.com/apache/arrow / Elt

Method Elt

r/src/altrep.cpp:630–639  ·  view source on GitHub ↗

The value at position i as an int (which R needs because this is a factor)

Source from the content-addressed store, hash-verified

628
629 // The value at position i as an int (which R needs because this is a factor)
630 static int Elt(SEXP alt, R_xlen_t i) {
631 if (Base::IsMaterialized(alt)) {
632 return INTEGER_ELT(Representation(alt), i);
633 }
634
635 int64_t elt64 = Elt64(alt, i);
636 ARROW_R_DCHECK(elt64 == NA_INTEGER || elt64 >= 1);
637 ARROW_R_DCHECK(elt64 <= std::numeric_limits<int>::max());
638 return static_cast<int>(elt64);
639 }
640
641 static R_xlen_t Get_region(SEXP alt, R_xlen_t start, R_xlen_t n, int* buf) {
642 // If we have data2, we can just copy the region into buf

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected