powered by
Return list of objects matching provided condition.
.get_item(list_obj, attribute, value, operator = `==`)
A subset of list object matching provided condition.
List of R objects.
Object attribute name.
Object value.
Logical operator - two-argument function taking `list_obj` attribute value as the first one, and `value` as the second one.
my_list <- list( list(id = 1, name = "a"), list(id = 2, name = "b") ) .get_item(my_list, "id", 1) .get_item(my_list, "name", c("b", "c"), identical)
Run the code above in your browser using DataLab