Skip to contents

Validates the seed argument used to control the k-means initialization in KmeansInference::kmeans_inference(). A valid seed must be NULL or a single non-missing, finite integer; malformed values (a vector, a non-integer numeric, NA, or a non-numeric value) are rejected immediately rather than being silently truncated, recycled, or coerced to NA by the underlying clustering call.

Usage

validate_seed(seed)

Arguments

seed

NULL, or a value intended to be used as a single integer random seed.

Value

NULL if seed is NULL, otherwise seed coerced to a single integer.