contr_one_hot: One-hot contrast matrix

contr_one_hotR Documentation

One-hot contrast matrix

Description

A re-export of hardhat::contr_one_hot() for use with indicators = "one_hot".

Usage

contr_one_hot(n, contrasts = TRUE, sparse = FALSE)

Arguments

n

A vector of character factor levels (of length >=1) or the number of unique levels (>= 1).

contrasts

This argument is for backwards compatibility and only the default of TRUE is supported.

sparse

This argument is for backwards compatibility and only the default of FALSE is supported.


tidyclust documentation built on June 20, 2026, 9:08 a.m.