[[arrow::export]]
| 39 | |
| 40 | // [[arrow::export]] |
| 41 | std::shared_ptr<arrow::Buffer> r___RBuffer__initialize(SEXP x) { |
| 42 | switch (TYPEOF(x)) { |
| 43 | case RAWSXP: |
| 44 | return std::make_shared<arrow::r::RBuffer<cpp11::raws>>(x); |
| 45 | case REALSXP: |
| 46 | return std::make_shared<arrow::r::RBuffer<cpp11::doubles>>(x); |
| 47 | case INTSXP: |
| 48 | return std::make_shared<arrow::r::RBuffer<cpp11::integers>>(x); |
| 49 | case CPLXSXP: |
| 50 | return std::make_shared<arrow::r::RBuffer<arrow::r::complexs>>( |
| 51 | arrow::r::complexs(x)); |
| 52 | default: |
| 53 | break; |
| 54 | } |
| 55 | cpp11::stop("R object of type <%s> not supported", Rf_type2char(TYPEOF(x))); |
| 56 | } |
| 57 | |
| 58 | // [[arrow::export]] |
| 59 | cpp11::writable::raws Buffer__data(const std::shared_ptr<arrow::Buffer>& buffer) { |
no test coverage detected