| 227 | } |
| 228 | |
| 229 | [[nodiscard]] std::string MakeJsonConfigForArray(SEXP missing, SEXP n_threads, SEXPTYPE arr_type) { |
| 230 | using namespace ::xgboost; // NOLINT |
| 231 | Json jconfig{Object{}}; |
| 232 | AddMissingToJson(&jconfig, missing, arr_type); |
| 233 | jconfig["nthread"] = Rf_asInteger(n_threads); |
| 234 | return Json::Dump(jconfig); |
| 235 | } |
| 236 | |
| 237 | // Allocate a R vector and copy an array interface encoded object to it. |
| 238 | [[nodiscard]] SEXP CopyArrayToR(const char *array_str, SEXP ctoken) { |
no test coverage detected