i have a data frame, from this I created another dataframe,
which consists of a selection after a number of conditions. The result is a number of countries that satisfy the condition n > 11.
Now I want to continue working with only these countries. How can I copy values from the first dataset based on the countries in the selection?
My first df looks like:
and the second (so the selection of countries):
In my final df I need every column and row from my 1st df (but only for the countries present in the second df)
>Solution :
I’m not sure about your data and reason using second dataframe, but let first and second data as df1 and df2, then
library(dplyr)
df1 %>%
fliter(Country.o... %in% df2$Country.o...)
(I cannot find out what is the column name. You should not post your data as an imange)

