If you look at the example if list.filter, you'll see that rlist is made to be used on more nested list, which a form of some elements, with the same field that you want to filter out. The result is one of the element of the primary list, based on a criteria on the nested list component. I am not sure it is useful in your current situation.
You could use this form
A = list(
e1 = list(NAME = "A", PAY = "100"),
e2 = list(NAME = "B", PAY = "200"),
e3 = list(NAME = "C", PAY = "300")
)
library(pipeR)
library(rlist)
A %>>%
list.filter(PAY >= 200) %>>%
list.select(NAME)
#> $e2
#> $e2$NAME
#> [1] "B"
#>
#>
#> $e3
#> $e3$NAME
#> [1] "C"
try purrr::transpose to pass from the two form of lists
Currently, you are using a list that you could put inside a data.frame
A = list(NAME = c("A","B","C"),
PAY = c("100","200","300"))
library(dplyr)
library(pipeR)
A %>>%
as_tibble() %>>%
filter(PAY >= 200) %>>%
pull(NAME)
#> [1] "B" "C"
Created on 2020-07-07 by the reprex package (v0.3.0)
You can also use base R
A = list(NAME = c("A","B","C"),
PAY = c("100","200","300"))
A$NAME[A$PAY>=200]
#> [1] "B" "C"
Hope it helps