validate_and_convert_data: Validate and convert input data

View source: R/31_pre_processing_functions.R

validate_and_convert_dataR Documentation

Validate and convert input data

Description

Checks whether the input is a matrix or data frame, and converts it to a matrix if valid.

Usage

validate_and_convert_data(data, name)

Arguments

data

A matrix or data frame.

name

A string used in error messages to identify the variable name.

Value

A numeric matrix.

Examples

validate_and_convert_data(data.frame(x = 1:3, y = 4:6), "example_data")


HMC documentation built on June 8, 2025, 10:32 a.m.