0

If I want to extract rows from a single data frame based on another one I use this:

data<- dat[dat$ABC %in% cod$ABC, ]

Now I have a list of data frames and a data frame. How can I extract rows from every data frame on the list based on the other data frame?

user195366
  • 465
  • 2
  • 13
  • 1
    Please make your question more reproducible by following suggestions [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – NelsonGon Feb 25 '19 at 11:31
  • 1
    If `cod` is the second dataframe, `lapply(list1, function(x) x[x$ABC %in% cod$ABC,])` – akrun Feb 25 '19 at 11:44

0 Answers0