Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unbox_list_elements

Unlist all list elements of length 1 if they are not a list


Description

This function wraps a simple modify_if function to "unbox" list elements. This is helpful when the as_list returns elements of XML and the element value is kept as a list of length 1, even though it could be a single primitive data type (e.g. logical, character, etc.).

Usage

unbox_list_elements(x)

Arguments

x

list; a list to be cleaned.

Value

list containing NA in place of NULL element values.

Note

This function is meant to be used internally. Only use when debugging.


salesforcer

An Implementation of 'Salesforce' APIs Using Tidy Principles

v0.2.2
MIT + file LICENSE
Authors
Steven M. Mortimer [aut, cre], Takekatsu Hiramura [ctb], Jennifer Bryan [ctb, cph], Joanna Zhao [ctb, cph]
Initial release
2020-09-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.