list.drop_zero: Remove empty list objects returned in the fashion of 'list()'

Description Usage Arguments Value See Also Examples

Description

list.drop_zero

list.drop_zero

Usage

1
2
3

Arguments

x

A list or data frame object.

x

A list or data frame object.

Value

Given a data object, return all objects whose length is greater than zero and is not of NULL or NA object orientation.

Given a data object, return all objects whose length is greater than zero and is not of NULL or NA object orientation.

See Also

dep_list, file_list, list.drop, list.drop_na, list.drop_null, mtrl.dep_to_list, packs.get_list, vig_list

dep_list, file_list, list.drop, list.drop_na, list.drop_null, mtrl.dep_to_list, packs.get_list, vig_list

Other data parse: list.drop

Other data parse: list.drop

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
aa <- as.list(mtcars)

toString(names(aa))
[1] "mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb"

aa$gear <- list()

aa <- list.drop_zero(aa)

bb <- list.drop_zero(aa)

names(aa)[!names(aa) %in% names(bb)]

[1] "gear"


aa <- as.list(mtcars)

toString(names(aa))
[1] "mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb"

aa$gear <- list()

aa <- list.drop_zero(aa)

bb <- list.drop_zero(aa)

names(aa)[!names(aa) %in% names(bb)]

[1] "gear"

Rterial/Rtbase documentation built on May 10, 2017, 10:21 a.m.