Learn R Programming

eList (version 0.0.1.0)

null.omit: Remove 'NULL' Entries from List

Description

Function removes all items that are NULL from a list, environment, or other object.

Usage

null.omit(x)

Arguments

x

object to be checked

Value

x without NULL entries

Examples

Run this code
# NOT RUN {
l <- list(a=2, b=NULL, c = 3)
length(l) == 3

k <- null.omit(l)
length(k) == 2

# }

Run the code above in your browser using DataLab