Supose I have this dataframe in a .dta, .txt or excel file:
ID fondo
1 colf
2 colf
3 prot
4 colf
5 porv
6 prot
7 porv
8 colf
9 colf
10 colf
I would like to read this file just the column 1 (ID
) and the rows where fondo == "colf"
. Then the final dataframe I would have in my R enviroment would be something like this:
ID
1
2
4
8
9
10