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

Method getDataPointer

r/src/arrow_types.h:185–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 RVector vec_;
184
185 static void* getDataPointer(RVector& vec) {
186 if (TYPEOF(vec) == LGLSXP) {
187 return LOGICAL(vec);
188 } else if (TYPEOF(vec) == INTSXP) {
189 return INTEGER(vec);
190 } else if (TYPEOF(vec) == REALSXP) {
191 return REAL(vec);
192 } else if (TYPEOF(vec) == CPLXSXP) {
193 return COMPLEX(vec);
194 } else if (TYPEOF(vec) == STRSXP) {
195 // We don't want to expose the string data here, so we error
196 cpp11::stop("Operation not supported for string vectors.");
197 } else {
198 // raw
199 return RAW(vec);
200 }
201 }
202};
203
204std::shared_ptr<arrow::DataType> InferArrowTypeFromFactor(SEXP);

Callers

nothing calls this directly

Calls 1

stopFunction · 0.85

Tested by

no test coverage detected