| 36 | } |
| 37 | |
| 38 | std::shared_ptr<arrow::DataType> InferArrowTypeFromFactor(SEXP factor) { |
| 39 | SEXP factors = Rf_getAttrib(factor, R_LevelsSymbol); |
| 40 | auto index_type = IndexTypeForFactors(Rf_length(factors)); |
| 41 | bool is_ordered = Rf_inherits(factor, "ordered"); |
| 42 | return dictionary(index_type, arrow::utf8(), is_ordered); |
| 43 | } |
| 44 | |
| 45 | template <int VectorType> |
| 46 | std::shared_ptr<arrow::DataType> InferArrowTypeFromVector(SEXP x) { |
no test coverage detected