R/extendr-wrappers.R
Dataset.RdBuilt from R via the new constructor, which takes the column names, a
parallel vector of kind strings ("discrete" / "continuous"), and the
columns flattened into a single f64 matrix (column-major, one dataset
column per matrix column). Discrete columns are factorized into integer
codes inside the core. The handle is cheap to clone (it is Arc-shared) so
several tests can bind the same factorization.
DatasetnewBuild a dataset from names, parallel kinds, and a values matrix
whose j-th column holds the values of column names[j].
The R wrapper (dataset()) is responsible for coding factor/character
columns to numbers before calling this, so values is always numeric.