Remove NULL items in a vector or list

compact(x)

Arguments

x

a vector or list