This is my list
mylist <- list(setosa = iris,versicolor = iris, virginica = iris)
I have to use filter dplyr function. But the argument should be the name of the list element that map is interate, because my list is much more bigger:
map(mylist, ~ .x %>% filter(Species == 'name_of_(.x)_element_list')
I tried to do something like this, but didnt work:
map(mylist, ~ .x %>% filter(Species == {{names(.x)}})
Any help