nullToNA: Replace NULL values with NA.

Description Usage Arguments Details Value Examples

Description

nullToNA is used to convert any NULL values to NA in a list.

Usage

1

Arguments

x

A list.

Details

This function is used when reading vectors from mongoDB. If the original vector had a value of NA, rmongodb converts to NULL before writing to the database. When rmongodb performs a find, these NULL values are left as NULL, and when unlisted will shorten the vector. Before unlisting the vector, this function is run to convert the NULL values to NA so that the vector remains the correct length and that NAs are in the correct positions.

Value

x with all NULL at the top level of the list replaced by NA.

Examples

1
## Not run: nullToNA(list(1,5,'a', NULL, NA, 4))

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