MCPcopy Create free account
hub / github.com/dmlc/xgboost / MakeJsonConfigForArray

Function MakeJsonConfigForArray

R-package/src/xgboost_R.cc:229–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 1

XGDMatrixCreateFromMat_RFunction · 0.85

Calls 1

AddMissingToJsonFunction · 0.85

Tested by

no test coverage detected