error_type_number: Incorrect size or type

Description Usage Arguments Value Examples

View source: R/main.R

Description

Reports error if type is not the correct size specified by number or if type is not one of the type_options.

Usage

1
error_type_number(type, number, type_options)

Arguments

type

character vector or array.

number

required length of type if type is a vector, or required dimension of type if type is an array.

type_options

character of what type is allowed to be.

Value

Error message if any component of type is not the correct size or allowed type.

Examples

1
2
3
4
5
6
## Reports an error because of wrong type. (not run)
#number_of_functional_predictors <- 3
#functional_coefficients_basis_type <- rep("cubic-spline",number_of_functional_predictors)
#functional_basis_options <- c("fpca","quantlet")
#error_type_number(functional_coefficients_basis_type,number_of_functional_predictors,
#functional_basis_options)

tpgarcia/stride documentation built on March 18, 2021, 3:42 p.m.