new_case_weights: Extend case weights

View source: R/case-weights.R

new_case_weightsR Documentation

Extend case weights

Description

[Experimental]

new_case_weights() is a developer oriented function for constructing a new case weights type. The ⁠<case_weights>⁠ type itself is an abstract type with very little functionality. Because of this, class is a required argument.

Usage

new_case_weights(x, ..., class)

Arguments

x

An integer or double vector.

...

Name-value pairs defining attributes

class

Name of subclass.

Value

A new subclassed case weights vector.

Examples

new_case_weights(1:5, class = "my_weights")

tidymodels/hardhat documentation built on Dec. 14, 2024, 11:11 a.m.