Skip to contents

Returns a structured report rather than throwing an error. NULL weights are valid (interpreted as unit weights) and return ok = TRUE.

Usage

oda_validate_weights(w, n)

Arguments

w

Numeric weight vector or NULL.

n

Expected length of w.

Value

Named list with: ok (logical), issues (character vector, empty if ok), n_weights (integer or NA), range (numeric(2) or NULL).