% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_compact.R
\name{compact_list}
\alias{compact_list}
\title{Remove empty elements from lists}
\usage{
compact_list(x, remove_na = FALSE)
}
\arguments{
\item{x}{A list or vector.}

\item{remove_na}{Logical to decide if \code{NA}s should be removed.}
}
\description{
Remove empty elements from lists
}
\examples{
compact_list(list(NULL, 1, c(NA, NA)))
compact_list(c(1, NA, NA))
compact_list(c(1, NA, NA), remove_na = TRUE)
}
