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

Function vec_to_Array

r/src/r_to_arrow.cpp:1584–1597  ·  view source on GitHub ↗

[[arrow::export]]

Source from the content-addressed store, hash-verified

1582
1583// [[arrow::export]]
1584SEXP vec_to_Array(SEXP x, SEXP s_type) {
1585 if (Rf_inherits(x, "Array")) return x;
1586
1587 bool type_inferred = Rf_isNull(s_type);
1588 std::shared_ptr<arrow::DataType> type;
1589
1590 if (type_inferred) {
1591 type = arrow::r::InferArrowType(x);
1592 } else {
1593 type = cpp11::as_cpp<std::shared_ptr<arrow::DataType>>(s_type);
1594 }
1595
1596 return cpp11::to_r6(arrow::r::vec_to_arrow_Array(x, type, type_inferred));
1597}
1598
1599// [[arrow::export]]
1600std::shared_ptr<arrow::Array> DictionaryArray__FromArrays(

Callers 1

_arrow_vec_to_ArrayFunction · 0.85

Calls 3

to_r6Function · 0.85
vec_to_arrow_ArrayFunction · 0.85
InferArrowTypeFunction · 0.70

Tested by

no test coverage detected