is_importance_weights: Is 'x' an importance weights vector?

View source: R/case-weights.R

is_importance_weightsR Documentation

Is x an importance weights vector?

Description

[Experimental]

is_importance_weights() checks if x inherits from "hardhat_importance_weights".

Usage

is_importance_weights(x)

Arguments

x

An object.

Value

A single TRUE or FALSE.

Examples

is_importance_weights(1)
is_importance_weights(frequency_weights(1))
is_importance_weights(importance_weights(1))

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