get_type: Get type of a vector or matrix of observed values or...

View source: R/get_-functions.R

get_typeR Documentation

Get type of a vector or matrix of observed values or predictions

Description

Internal helper function to get the type of a vector (usually of observed or predicted values). The function checks whether the input is a factor, or else whether it is integer (or can be coerced to integer) or whether it's continuous.

Usage

get_type(x)

Arguments

x

Input the type should be determined for.

Value

Character vector of length one with either "classification", "integer", or "continuous".


epiforecasts/scoringutils documentation built on April 23, 2024, 4:56 p.m.