Hello! I need some help with R Studio and a code.
- Find and list the ten country codes that appear most frequently in the top decile for real GDPpc (rgdppc). Find and list the ten country codes that appear most frequently in the bottom decile for real GDPpc (rgdppc).
I am trying this but nothing seems to be working. I'm trying to figure out if I'm in the right direction... I can't find a code that will list the first 10 that come up in the 10% and 90% deciles for 2 variables.
gdp<-PS3$rgdppc %>%. # my object for GDPpc
select(PS3$ccode, gdp) %>% # trying to tell R to select country code + GDPpc
quantile(PS3$ccode, probs = seq(.1, .9, by = .1)) # getting the quantiles