check_data: Validate that input is a suitable numeric vector

View source: R/utils.R

check_dataR Documentation

Validate that input is a suitable numeric vector

Description

Stops with an informative message if the data are not numeric, have fewer than 4 finite observations, or violate a stated support constraint.

Usage

check_data(x, dist_name = NULL, require_pos = FALSE, require_01 = FALSE)

Arguments

x

Numeric vector supplied by the user.

dist_name

Distribution name, used only in error messages.

require_pos

If TRUE, all values must be strictly positive.

require_01

If TRUE, all values must lie in the open interval (0,1).

Value

Invisibly TRUE; stops on failure.


FitVerse documentation built on Dec. 1, 2026, 1:07 a.m.