sq_null_to_na: Convenience Function to Map 'NULL' to 'NA'

Description Usage Arguments Value Examples

Description

This function checks if a value is null and if so, returns NA. This is helpful when pulling information from lists and formatting to a data.frame structure where new rows cannot be NULL.

Usage

1

Arguments

x

object; to be checked if NULL that returns NA if it is NULL

Value

object

Examples

1
2
3
4
5
6
## Not run: 
sq_null_to_na(3)
sq_null_to_na(NULL)
sq_null_to_na(list(x=1, y=2))

## End(Not run)

StevenMMortimer/squareupr documentation built on July 12, 2019, 1:45 a.m.