I have a large list containing single lists of multiple tibbles. I want to select only relevant columns with purrr::map, but I get the error message that deplyr::select is not aplicable for lists. If my list only contains one tibble at a time the dplyr::select command works, as the select function recognizes the format as a tibble. So it should be quite easy to work around this error, but I can not quite get there.
The error I get is:
select()
doesn't handle lists
How can I work around this, as it should be possible to write a command something like that:
cleaned_lists <- map(lists,select,matches("string1|string2|string3|string4|string5"))
Thanks in advance!