listTonumeric is used to convert x to a numeric type if x is a list.
A list of length Y without NULL values.
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
nullToNA converts the NULL values to NA, and this function
converts the list back to a numeric type.
x a numeric vector of length Y.
## Not run: class(listTonumeric(list(1,2,3,4,NA,6,7)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.