The value at position i as an int (which R needs because this is a factor)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected