unbox_list_elements_recursively: Recursively unlist all list elements of length 1 if they are...

View source: R/utils-query.R

unbox_list_elements_recursivelyR Documentation

Recursively unlist all list elements of length 1 if they are not a list

Description

This function wraps a simple modify_if function to recursively "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_recursively(x)

Arguments

x

list; a list to be cleaned.

Value

list containing "unboxed" list elements.

Note

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


salesforcer documentation built on March 18, 2022, 6:26 p.m.