set the names, row names and class of a list of columns
| 880 | |
| 881 | // set the names, row names and class of a list of columns |
| 882 | SEXP FinishDataFrame(cpp11::writable::list& out, R_xlen_t n) const { |
| 883 | auto type = |
| 884 | checked_cast<const arrow::StructType*>(this->chunked_array_->type().get()); |
| 885 | auto colnames = arrow::r::to_r_strings( |
| 886 | type->fields(), |
| 887 | [](const std::shared_ptr<Field>& field) { return field->name(); }); |
| 888 | out.attr(symbols::row_names) = arrow::r::short_row_names(static_cast<int>(n)); |
| 889 | out.attr(R_NamesSymbol) = colnames; |
| 890 | out.attr(R_ClassSymbol) = arrow::r::data::classes_tbl_df; |
| 891 | |
| 892 | return out; |
| 893 | } |
| 894 | }; |
| 895 | |
| 896 | double ms_to_seconds(int64_t ms) { return static_cast<double>(ms) / 1000; } |
nothing calls this directly
no test coverage detected