unlist_null2na: unlist_null2na

View source: R/unlist_null2na.R

unlist_null2naR Documentation

unlist_null2na

Description

This function converts NULL to NA and then apply unlist(). Inspired by https://stackoverflow.com/questions/2991514/prevent-unlist-to-drop-null-values

Usage

unlist_null2na(l, ...)

Arguments

...

passed to unlist()

x

input list

Examples

x <- list(NULL, 1, 2)
unlist_null2na(x)

sleeubc/sanghoon documentation built on April 10, 2022, 5:30 p.m.