merge_null_to_na {salesforcer} | R Documentation |
Return NA if NULL
Description
A helper function to convert NULL values in API responses to a value of NA which is allowed in data frames. Oftentimes, a NULL value creates issues when binding and building data frames from parsed output, so we need to switch to NA.
Usage
merge_null_to_na(x)
Arguments
x |
a value, typically a single element or a list to switch to NA if its value appears to be NULL. |
Value
the original value of parameter x
or NA
if the value
meets the criteria to be considered NULL.
Note
This function is meant to be used internally. Only use when debugging.
[Package salesforcer version 1.0.1 Index]