This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df2 %>% rename_(.dots=setNames(names(.), (gsub("X", "", names(.))))) | |
## Source: local data frame [7 x 4] | |
## | |
## GDP.per.capita 1800 1801 1802 | |
## (chr) (chr) (chr) (chr) | |
## 1 Abkhazia NA NA NA | |
## 2 Afghanistan 634.4000136 634.4000136 634.4000136 | |
## 3 Akrotiri and Dhekelia NA NA NA | |
## 4 Albania 860.5879664 861.4817538 862.3764694 | |
## 5 Algeria 1360 1361.635788 1363.271576 | |
## 6 American Samoa NA NA NA | |
## 7 Andorra 1260 1262.15 1264.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment