What gets printed on .Internal(inspect( ))
| 127 | |
| 128 | // What gets printed on .Internal(inspect(<the altrep object>)) |
| 129 | static Rboolean Inspect(SEXP alt, int pre, int deep, int pvec, |
| 130 | void (*inspect_subtree)(SEXP, int, int, int)) { |
| 131 | SEXP class_sym = R_altrep_class_name(alt); |
| 132 | const char* class_name = CHAR(PRINTNAME(class_sym)); |
| 133 | |
| 134 | if (IsMaterialized(alt)) { |
| 135 | Rprintf("materialized %s len=%ld\n", class_name, |
| 136 | static_cast<long>(Rf_xlength(Representation(alt)))); // NOLINT: runtime/int |
| 137 | } else { |
| 138 | const auto& chunked_array = GetChunkedArray(alt); |
| 139 | Rprintf("%s<%p, %s, %d chunks, %ld nulls> len=%ld\n", class_name, |
| 140 | reinterpret_cast<void*>(chunked_array.get()), |
| 141 | chunked_array->type()->ToString().c_str(), chunked_array->num_chunks(), |
| 142 | static_cast<long>(chunked_array->null_count()), // NOLINT: runtime/int |
| 143 | static_cast<long>(chunked_array->length())); // NOLINT: runtime/int |
| 144 | } |
| 145 | |
| 146 | return TRUE; |
| 147 | } |
| 148 | |
| 149 | // Materialize and then duplicate data2 |
| 150 | static SEXP Duplicate(SEXP alt, Rboolean /* deep */) { |
no test coverage detected