[Stable]

extract_possibly(...)

Arguments

...

A list and a field name

Examples

lol <- list(field1 = 1, field2 = 2, field3 = 3, field4 = 4, field5 = 5)
extract_possibly(lol, "field1")
#> $field1
#> [1] 1
#> 
extract_possibly(lol, "field8")
#> $<NA>
#> NULL
#>