typecast: Create a custom typecast object

Description Usage Arguments Value See Also Examples

View source: R/typecast.R

Description

This function creates a typecast object, i.e. an object that provides functions for conversion from and to the internal data storage format. It is used by sqlDao to transparently convert between the internal and output data format.

Usage

1
typecast(fromInternal, toInternal)

Arguments

fromInternal

a function for conversion of data from the internal to the output data format

toInternal

a function for conversion of data from the output to the internal data format

Value

An object of class 'typecast', which is a list of two single-argument functions.

See Also

sqlDao, typecastDateToCharacter, typecastDateToNumeric

Examples

1
2
# Create a typecast object for data stored internally as character, but output as numeric values
tc <- typecast(as.numeric, as.character)

beerda/crudtable documentation built on July 13, 2020, 2:16 p.m.