powered by
Compact()
.x
Compact(.x)
# Removes all null elements from a vector: a <- list(NULL, 1, 5, NULL) Compact(a) b <- c(1, 2, 0, 4, NULL, 1, 3, NULL) Compact(b)
Run the code above in your browser using DataLab