Skip to contents

[Stable]

This function selects named or unnamed objects in lists. It is equivalent to list[c("object")] or list[c(1,2)]

Usage

list_select(.list, ...)

Arguments

.list

a list

...

objects

Examples

 list(
   obj1 = mtcars,
   obj2 = airmiles
 ) -> list1

   list(
   mtcars,
   airmiles
 ) -> list2
list_remove(list1, "obj1")
#> $obj2
#> Time Series:
#> Start = 1937 
#> End = 1960 
#> Frequency = 1 
#>  [1]   412   480   683  1052  1385  1418  1634  2178  3362  5948  6109  5981
#> [13]  6753  8003 10566 12528 14760 16769 19819 22362 25340 25343 29269 30514
#> 
list_remove(list2, 1)
#> [[1]]
#> Time Series:
#> Start = 1937 
#> End = 1960 
#> Frequency = 1 
#>  [1]   412   480   683  1052  1385  1418  1634  2178  3362  5948  6109  5981
#> [13]  6753  8003 10566 12528 14760 16769 19819 22362 25340 25343 29269 30514
#>