Built 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.

Dataset

Methods

Method new

Build 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.

Method n_rows

Number of rows (observations).

Method n_cols

Number of columns.

Method index_of

1-based index of the column named name, or NA if it is absent.