valueType_of: Return the valueType of an object

View source: R/04-catalogue_functions.R

valueType_ofR Documentation

Return the valueType of an object

Description

Determines the valueType of an object based on typeof() and class(). The possible values returned are 'date', 'boolean', 'integer', 'decimal', and 'text'.

Usage

valueType_of(x)

Arguments

x

Object. Can be a vector.

Details

The valueType is a declared property of a variable that is required in certain functions to determine handling of the variables. Specifically, valueType refers to the OBiBa data type of a variable. The valueType is specified in a data dictionary in a column 'valueType' and can be associated with variables as attributes. Acceptable valueTypes include 'text', 'integer', 'decimal', 'boolean', datetime', 'date'. The full list of OBiBa valueType possibilities and their correspondence with R data types are available using valueType_list. The valueType can be used to coerce the variable to the corresponding data type.

Value

A character string which is the valueType of the input object.

See Also

typeof(), class() Opal documentation

Examples

{

# use madshapR_DEMO provided by the package

dataset <- madshapR_DEMO$dataset_MELBOURNE
valueType_of(dataset$Gender)
valueType_of(iris$Sepal.Length)

}


madshapR documentation built on May 29, 2024, 7:43 a.m.