listTonumeric: Convert x to numeric if x is a list.

Description Usage Arguments Details Value Examples

Description

listTonumeric is used to convert x to a numeric type if x is a list.

Usage

1

Arguments

x

A list of length Y without NULL values.

Details

This function is used as part of reading data from mongoDB using rmongodb. Typically values will be stored as numeric vectors. However, if an NA is in the original vector, rmongodb will convert to NULL prior to writing to the database. This gets read from the database as a list of length Y rather than a numeric of length Y with positions that were NA now with value NULL. The function nullToNA converts the NULL values to NA, and this function converts the list back to a numeric type.

Value

x a numeric vector of length Y.

Examples

1
## Not run: class(listTonumeric(list(1,2,3,4,NA,6,7)))

ericwatt/toxboot documentation built on May 16, 2019, 8:41 a.m.