Subsetting DataFrame in R by duplicate values for Year by lowest value for Rating
问题 I have a data frame which looks like this > fitchRatings Country Month Year FitchLongTerm LongTermTransformed 1 Abu Dhabi 7 2007 AA 22 2 Angola 5 2012 BB- 12 3 Angola 5 2011 BB- 12 4 Angola 5 2010 B+ 11 5 Argentina 7 2010 B 10 6 Argentina 12 2008 RD 3 7 Argentina 8 2006 RD 3 8 Argentina 12 2005 RD 3 9 Argentina 6 2005 DDD 2 10 Argentina 1 2005 D 0 As you can see, for some Countries, there are multiple observations for a single year. I want to subset the DF so that I keep only one observation