Skip to contents

The type half of check_matrix(), split out because the shape rules differ between entry points but this rule does not. On the pre-computed (theta, x) path a row is one simulation, so a bare vector is a column of values rather than check_matrix()'s single row; a character or factor column is the same mistake in either place. Left to storage.mode(x) <- "double" such a column becomes all NA, every row is then dropped as non-finite, and the error blames a simulator that was never called.

Usage

check_numeric(value, arg)

Arguments

value

The user's value: a numeric vector, matrix or data frame.

arg

Name of the argument, as it appears in the user's call.

Value

value, with a data frame converted to a matrix.