我正在尝试使用国际货币基金组织 IFS 数据库中的数据。 下载的文件是 csv,事实证明很难使用 这是它的外观示例
structure(list(Country.Name = c("Dominica", "Costa Rica", "Bahamas, The",
"Australia", "Mexico", "South Africa", "Grenada", "Trinidad and Tobago",
"Belize", "Ireland", "Ghana", "Austria", "Tunisia", "Uruguay",
"Paraguay", "Iran, Islamic Rep. of", "Bolivia", "Venezuela, Rep. Bolivariana de",
"Chile", "Iceland", "Pakistan", "Central African Rep.", "Antigua and Barbuda",
"Poland, Rep. of", "St. Lucia", "Malta", "Portugal", "Nicaragua",
"Cyprus", "Guyana", "Saudi Arabia", "Switzerland", "Netherlands, The",
"Canada", "St. Kitts and Nevis", "Dominican Rep.", "Malaysia",
"St. Vincent and the Grenadines", "Philippines", "Singapore",
"Spain", "Sweden", "Gambia, The", "Congo, Dem. Rep. of the",
"Algeria", "United States", "Japan", "Bahrain, Kingdom of", "Finland",
"Greece", "New Zealand", "Gabon", "Uganda", "Euro Area", "Norway",
"Belgium", "Italy", "Luxembourg", "Colombia", "Côte d'Ivoire",
"United Kingdom", "Burundi", "France", "Denmark", "Georgia",
"Equatorial Guinea, Rep. of", "Cameroon", "Solomon Islands",
"Brazil", "Germany", "Morocco", "Israel", "Togo", "Romania",
"Nigeria", "Moldova, Rep. of", "Lesotho, Kingdom of", "North Macedonia, Republic of",
"Zambia", "Samoa", "China, P.R.: Mainland", "Russian Federation",
"Malawi", "Bulgaria", "Croatia, Rep. of", "Armenia, Rep. of",
"Hungary", "Latvia", "Fiji, Rep. of", "Papua New Guinea", "Sierra Leone",
"Ukraine", "Slovak Rep.", "Czech Rep.", "Brunei Darussalam",
"Brunei Darussalam", "Djibouti", "Djibouti", "Bulgaria", "Brazil",
"Brazil", "Austria", "Austria", "China, P.R.: Macao", "China, P.R.: Macao",
"Bahrain, Kingdom of", "Bahrain, Kingdom of", "Congo, Rep. of",
"Congo, Rep. of", "Côte d'Ivoire", "Côte d'Ivoire", "Kenya",
"Ireland", "Ireland", "Cambodia", "Belize", "Belize", "China, P.R.: Mainland",
"China, P.R.: Mainland", "Cameroon", "Cameroon", "Congo, Dem. Rep. of the",
"Congo, Dem. Rep. of the", "Bangladesh", "Bangladesh", "Antigua and Barbuda",
"Antigua and Barbuda", "Belgium", "Belgium", "Afghanistan, Islamic Rep. of",
"Afghanistan, Islamic Rep. of", "Korea, Rep. of", "Korea, Rep. of",
"Angola", "Angola", "Australia", "Australia", "Comoros, Union of the",
"Comoros, Union of the", "Denmark", "Denmark", "Botswana", "Botswana",
"Mozambique, Rep. of", "Mozambique, Rep. of", "Myanmar", "Myanmar",
"Norway", "Norway", "Ethiopia, The Federal Dem. Rep. of", "Ethiopia, The Federal Dem. Rep. of",
"Iran, Islamic Rep. of", "Iran, Islamic Rep. of", "Canada", "Gabon",
"Gabon", "Chad", "Chad", "Central African Rep.", "Central African Rep.",
"Guinea", "Guinea", "Grenada", "Grenada", "India", "India", "Syrian Arab Rep.",
"Syrian Arab Rep.", "Anguilla", "Anguilla", "Bahamas, The", "Bahamas, The",
"Iceland", "Iceland", "Barbados", "Barbados", "Benin", "Benin",
"Aruba, Kingdom of the Netherlands", "Aruba, Kingdom of the Netherlands",
"Armenia, Rep. of", "Bhutan", "Bhutan", "Algeria", "Algeria",
"Bosnia and Herzegovina", "Bosnia and Herzegovina", "Cyprus",
"Cyprus", "Lao People's Dem. Rep.", "Lao People's Dem. Rep.",
"Japan", "Japan", "Argentina", "Argentina", "Burkina Faso", "Burkina Faso",
"Thailand", "Thailand", "Italy", "Italy", "Türkiye, Rep of",
"Türkiye, Rep of", "Chile", "Chile", "Belarus, Rep. of", "Belarus, Rep. of",
"Burundi", "Croatia, Rep. of", "Costa Rica", "Costa Rica", "Ecuador",
"Ecuador", "Finland", "Finland", "Ghana", "Ghana", "Indonesia",
"Indonesia", "Samoa", "Samoa", "Ukraine", "Ukraine", "Switzerland",
"Switzerland", "Tajikistan, Rep. of", "Tajikistan, Rep. of",
"Niger", "Niger", "Colombia", "Colombia", "Kosovo, Rep. of",
"Kosovo, Rep. of", "Kuwait", "Namibia", "Namibia", "Israel",
"Israel", "Egypt, Arab Rep. of", "Egypt, Arab Rep. of", "France",
"France", "El Salvador", "El Salvador", "China, P.R.: Hong Kong",
"China, P.R.: Hong Kong", "Curaçao and Sint Maarten", "Curaçao and Sint Maarten",
"Guinea-Bissau", "Guinea-Bissau", "Cabo Verde", "Dominica", "Dominica",
"Guyana", "Guyana", "Germany", "Fiji, Rep. of", "Fiji, Rep. of",
"Greece", "Greece", "Madagascar, Rep. of", "Madagascar, Rep. of",
"Jamaica", "Jamaica", "Latvia", "Nigeria", "Nigeria", "Jordan",
"Jordan", "Czech Rep.", "Malawi", "Malawi", "Mexico", "Malta",
"Hungary", "Dominican Rep.", "Russian Federation", "Russian Federation",
"Spain", "Spain", "Seychelles", "Seychelles", "Sudan", "Sudan",
"Haiti", "Haiti", "Tanzania, United Rep. of", "Zambia", "Liberia",
"Liberia", "Bolivia", "Bolivia", "Suriname", "Suriname", "Albania",
"Albania", "Kyrgyz Rep.", "Luxembourg", "San Marino, Rep. of",
"San Marino, Rep. of", "Uganda", "Uganda", "Togo", "Togo", "Libya",
"Eritrea, The State of", "Eritrea, The State of", "Romania",
"Romania", "Gambia, The", "Gambia, The", "Equatorial Guinea, Rep. of",
"Equatorial Guinea, Rep. of", "Estonia, Rep. of", "Guatemala",
"Azerbaijan, Rep. of", "Azerbaijan, Rep. of", "Kazakhstan, Rep. of",
"Iraq", "Iraq", "Singapore", "Singapore", "Morocco", "Yemen, Rep. of",
"Yemen, Rep. of", "Lebanon", "Lebanon", "St. Lucia", "St. Lucia",
"Sri Lanka", "Sri Lanka", "Tunisia", "Tunisia", "Lesotho, Kingdom of",
"Lesotho, Kingdom of"), Country.Code = c(321L, 238L, 313L, 193L,
273L, 199L, 328L, 369L, 339L, 178L, 652L, 122L, 744L, 298L, 288L,
429L, 218L, 299L, 228L, 176L, 564L, 626L, 311L, 964L, 362L, 181L,
182L, 278L, 423L, 336L, 456L, 146L, 138L, 156L, 361L, 243L, 548L,
364L, 566L, 576L, 184L, 144L, 648L, 636L, 612L, 111L, 158L, 419L,
172L, 174L, 196L, 646L, 746L, 163L, 142L, 124L, 136L, 137L, 233L,
662L, 112L, 618L, 132L, 128L, 915L, 642L, 622L, 813L, 223L, 134L,
686L, 436L, 742L, 968L, 694L, 921L, 666L, 962L, 754L, 862L, 924L,
922L, 676L, 918L, 960L, 911L, 944L, 941L, 819L, 853L, 724L, 926L,
936L, 935L, 516L, 516L, 611L, 611L, 918L, 223L, 223L, 122L, 122L,
546L, 546L, 419L, 419L, 634L, 634L, 662L, 662L, 664L, 178L, 178L,
522L, 339L, 339L, 924L, 924L, 622L, 622L, 636L, 636L, 513L, 513L,
311L, 311L, 124L, 124L, 512L, 512L, 542L, 542L, 614L, 614L, 193L,
193L, 632L, 632L, 128L, 128L, 616L, 616L, 688L, 688L, 518L, 518L,
142L, 142L, 644L, 644L, 429L, 429L, 156L, 646L, 646L, 628L, 628L,
626L, 626L, 656L, 656L, 328L, 328L, 534L, 534L, 463L, 463L, 312L,
312L, 313L, 313L, 176L, 176L, 316L, 316L, 638L, 638L, 314L, 314L,
911L, 514L, 514L, 612L, 612L, 963L, 963L, 423L, 423L, 544L, 544L,
158L, 158L, 213L, 213L, 748L, 748L, 578L, 578L, 136L, 136L, 186L,
186L, 228L, 228L, 913L, 913L, 618L, 960L, 238L, 238L, 248L, 248L,
172L, 172L, 652L, 652L, 536L, 536L, 862L, 862L, 926L, 926L, 146L,
146L, 923L, 923L, 692L, 692L, 233L, 233L, 967L, 967L, 443L, 728L,
728L, 436L, 436L, 469L, 469L, 132L, 132L, 253L, 253L, 532L, 532L,
355L, 355L, 654L, 654L, 624L, 321L, 321L, 336L, 336L, 134L, 819L,
819L, 174L, 174L, 674L, 674L, 343L, 343L, 941L, 694L, 694L, 439L,
439L, 935L, 676L, 676L, 273L, 181L, 944L, 243L, 922L, 922L, 184L,
184L, 718L, 718L, 732L, 732L, 263L, 263L, 738L, 754L, 668L, 668L,
218L, 218L, 366L, 366L, 914L, 914L, 917L, 137L, 135L, 135L, 746L,
746L, 742L, 742L, 672L, 643L, 643L, 968L, 968L, 648L, 648L, 642L,
642L, 939L, 258L, 912L, 912L, 916L, 433L, 433L, 576L, 576L, 686L,
474L, 474L, 446L, 446L, 362L, 362L, 524L, 524L, 744L, 744L, 666L,
666L), Indicator.Code = c("EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX", "EREER_IX",
"EREER_IX", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE", "ENDE_XDC_USD_RATE",
"ENDE_XDC_USD_RATE"), `1977M11` = c(NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 2.37550657222339, NA, 177.721, NA,
NA, 5.64909090872727e-12, NA, 15.919999999, NA, 5, NA, 0.395647873549218,
NA, 242.924828113858, NA, 242.924828113858, NA, 8.1437, 0.550964187631385,
NA, NA, 2, NA, 1.786299999, NA, 242.92499995, NA, 2.80743301231258e-12,
NA, 15.065999999, NA, 2.7, NA, 35.104999999, NA, 38.0835, NA,
484, NA, 2.9918e-08, NA, 0.886996630199571, NA, 242.922633936922,
NA, 6.147499999, NA, 0.828157350582325, NA, 0.033406499999, NA,
7.2529, NA, 5.401999999, NA, 2.069999999, NA, 70.625, NA, 1.1084,
242.924828113858, NA, 242.925000123021, NA, 242.924828113858,
NA, 20.8596434430911, NA, 2.7, NA, 8.652389999, NA, 3.924999999,
NA, 2.7, NA, 1, NA, 2.119999999657, NA, 2.011299999, NA, 242.925000123021,
NA, NA, NA, NA, 8.652389999, NA, 4.114999999, NA, NA, NA, 0.39769337856341,
NA, 200, NA, 245.699999999, NA, 5.575e-09, NA, 242.924828113858,
NA, 20.399999999, NA, 877.799999997, NA, 1.9442999999e-05, NA,
26.169999999, NA, NA, NA, 90, NA, 8.569999999, NA, 24.999999999,
NA, 4.194999999, NA, 0.000114999367635727, NA, 415, NA, 0.767400814033766,
NA, NA, NA, 2.16, NA, NA, NA, 242.924828113858, NA, 37.55, NA,
NA, NA, 0.283647709625201, 0.869565218147448, NA, 0.00152817059787356,
NA, 0.391304999, NA, 4.858499999, NA, 2.499999999, NA, 4.663,
NA, NA, NA, 242.925000123021, NA, 34.419999999, 2.7, NA, 2.549999999,
NA, 2.227799999, 0.887705281846427, NA, 36.146999999, NA, 48.58499999,
NA, 0.909090000827354, NA, NA, 0.651380927990738, NA, 0.324002073718248,
NA, NA, 0.888699999, NA, 0.022653999999, 0.411641213687746, 40.599999999,
0.999999999, NA, NA, 82.559999999, NA, 7.346170798, NA, 0.000348246902456983,
NA, 4.99910538457899, NA, 8.1513, 0.000777139660372203, 43.2590098577311,
NA, 2e-05, NA, 0.001785, NA, NA, NA, NA, 35.104999999, 877.799999997,
NA, 0.08162899999, NA, 242.92499995, NA, 0.296050683964726, 2.07162642857143,
NA, 0.002, NA, 2.20385675416828, NA, 242.924828113858, NA, NA,
0.999999999, NA, NA, NA, 1841.74060340376, NA, 2.375199999, NA,
4.471249999, NA, NA, 3.073999999, NA, 2.7, NA, 15.949999999,
NA, 0.426699999, NA, 0.869565218147448, NA), `1977M12` = c("",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "2.33880183525922",
"", "177.721", "", "", "5.836363636E-12", "", "15.135", "", "4.949999999",
"", "0.395647873549218", "", "235.249833542868", "", "235.249833542868",
"", "7.947099999", "0.524658971943683", "", "", "2", "", "1.729999999",
"", "235.24999995", "", "2.76963301659001E-12", "", "14.395499999",
"", "2.7", "", "32.939999999", "", "38.0835", "", "484", "",
"2.9918E-08", "", "0.876117050005359", "", "235.247708689008",
"", "5.777499999", "", "0.828157350582325", "", "0.032550999999",
"", "7.0873", "", "5.139499999", "", "2.069999999", "", "70.474999999",
"", "1.094", "235.249833542868", "", "235.250000117555", "",
"235.249833542868", "", "20.3219715238159", "", "2.7", "", "8.208499999",
"", "3.924999999", "", "2.7", "", "1", "", "2.13099999965527",
"", "2.011299999", "", "235.250000117555", "", "", "", "", "8.208499999",
"", "4.034999999", "", "", "", "0.382336073554707", "", "200",
"", "239.999999999", "", "5.975E-09", "", "235.249833542868",
"", "20.399999999", "", "871.549999997", "", "1.9442999999E-05",
"", "27.959999999", "", "", "", "90", "", "8.569999999", "",
"24.999999999", "", "4.017999999", "", "0.000114999367635727",
"", "415", "", "0.748553421075187", "", "", "", "1.999999999",
"", "", "", "235.249833542868", "", "37.96", "", "", "", "0.280088508046968",
"0.869565218147448", "", "0.00153717088358544", "", "0.391304999",
"", "4.704999999", "", "2.499999999", "", "4.615", "", "", "",
"235.250000117555", "", "33.899999999", "2.7", "", "2.549999999",
"", "2.104999999", "0.870549316618786", "", "35.505999999", "",
"47.04999999", "", "0.909090000827354", "", "", "0.651380927990738",
"", "0.31500031509954", "", "", "0.867799999", "", "0.022736299999",
"0.394570707226393", "40.599999999", "0.999999999", "", "", "80.911999999",
"", "6.995435466", "", "0.000348246902456983", "", "4.99910538457899",
"", "7.959999999", "0.000759849550366513", "43.2590098577311",
"", "2E-05", "", "0.001785", "", "", "", "", "32.939999999",
"871.549999997", "", "0.07954399999", "", "235.24999995", "",
"0.296050683964726", "2.07162642857143", "", "0.002", "", "2.09863589107793",
"", "235.249833542868", "", "", "0.999999999", "", "", "", "1841.74060340376",
"", "2.338499999", "", "4.326949999", "", "", "2.999999999",
"", "2.7", "", "15.559999999", "", "0.412049999", "", "0.869565218147448",
""), `1978M1` = c("", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "2.33090081658586", "", "177.721", "", "", "5.90909090909091E-12",
"", "15.162499999", "", "4.949999999", "", "0.387852461074294",
"", "236.624832570244", "", "236.624832570244", "", "7.953899999",
"0.512715340705863", "", "", "2", "", "1.6952", "", "236.62499995",
"", "2.74236635300882E-12", "", "14.7308", "", "2.7", "", "32.708",
"", "38.0835", "", "484", "", "2.9918E-08", "", "0.878580214373572",
"", "236.62269529694", "", "5.718999999", "", "0.828157350582325",
"", "0.032550999999", "", "7.0876", "", "5.131499999", "", "2.069999999",
"", "70.474999999", "", "1.1074", "236.624832570244", "", "236.625000118534",
"", "236.624832570244", "", "20.315114597743", "", "2.7", "",
"8.062889999", "", "3.924999999", "", "2.7", "", "1", "", "2.18599999964663",
"", "2.011299999", "", "236.625000118534", "", "", "", "", "8.062889999",
"", "4.043999999", "", "", "", "0.383141762452107", "", "200",
"", "241.399999999", "", "6.415E-09", "", "236.624832570244",
"", "20.399999999", "", "867", "", "1.9442999999E-05", "", "28.759999999",
"", "", "", "90", "", "8.569999999", "", "24.999999999", "",
"3.994999999", "", "0.000114999367635727", "", "415", "", "0.746825990102185",
"", "", "", "1.980999999", "", "", "", "236.624832570244", "",
"38.08", "", "", "", "0.27994736997283", "0.869565218147448",
"", "0.00160103195634462", "", "0.391304999", "", "4.732499999",
"", "2.499999999", "", "4.604", "", "", "", "236.625000118534",
"", "34.179999999", "2.7", "", "2.549999999", "", "2.111799999",
"0.866250866250866", "", "36.181999999", "", "47.32499999", "",
"1.05000000042", "", "", "0.626566416432686", "", "0.314001318904136",
"", "", "0.867899999", "", "0.022725899999", "0.393452943182819",
"39.799999999", "0.999999999", "", "", "80.569999999", "", "6.836187448",
"", "0.000348246902456983", "", "4.99910538457899", "", "7.961399999",
"0.000759982368986626", "43.2590098577311", "", "2E-05", "",
"0.001785", "", "", "", "", "32.708", "867", "", "0.07949799999",
"", "236.62499995", "", "0.296050683964726", "2.07162642857143",
"", "0.002", "", "2.05086136597798", "", "236.624832570244",
"", "", "0.999999999", "", "", "", "1841.74060340376", "", "2.3306",
"", "4.322999999", "", "", "2.969999999", "B", "2.7", "", "15.344999999",
"", "0.418399999", "", "0.869565218147448", ""), `1978M2` = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 2.31579886658958,
NA, 177.721, NA, NA, 5.99818181781818e-12, NA, 14.659999999,
NA, 4.929999999, NA, 0.387852461074294, NA, 238.274831403096,
NA, 238.274831403096, NA, 7.884799999, 0.516982888133683, NA,
NA, 2, NA, 1.651499999, NA, 238.27499995, NA, 2.70703302367379e-12,
NA, 14.791499999, NA, 2.7, NA, 31.648, NA, 38.0835, NA, 484,
NA, 2.9918e-08, NA, 0.879894413444694, NA, 238.27267922646, NA,
5.579999999, NA, 0.828157350582325, NA, 0.032550999999, NA, 6.9963,
NA, 5.315999999, NA, 2.069999999, NA, 70.474999999, NA, 1.1152,
238.274831403096, NA, 238.275000119709, NA, 238.274831403096,
NA, 20.1233407107017, NA, 2.7, NA, 8.123479999, NA, 3.924999999,
NA, 2.7, NA, 1, NA, 2.53399999959197, NA, 2.011299999, NA, 238.275000119709,
NA, NA, NA, NA, 8.123479999, NA, 4.029999999, NA, NA, NA, 0.378859632649691,
NA, 200, NA, 238.699999999, NA, 6.815e-09, NA, 238.274831403096,
NA, 20.399999999, NA, 853.350000001, NA, 1.9442999999e-05, NA,
29.479999999, NA, NA, NA, 90, NA, 8.569999999, NA, 24.999999999,
NA, 4.172999999, NA, 0.000114999367635727, NA, 415, NA, 0.746402341274857,
NA, NA, NA, 1.872999999, NA, NA, NA, 238.274831403096, NA, 38.22,
NA, NA, NA, 0.278450700381046, 0.869565218147448, NA, 0.0016141577892252,
NA, 0.391304999, NA, 4.765499999, NA, 2.499999999, NA, 4.611,
NA, NA, NA, 238.275000119709, NA, 34.129999999, 2.7, NA, 2.549999999,
NA, 2.035999999, 0.867754251995835, NA, 36.216999999, NA, 47.65499999,
NA, 1.05000000042, NA, NA, 0.622548714824472, NA, 0.311003296731667,
NA, NA, 0.860399999, NA, 0.022740299999, 0.387942739802127, 39.799999999,
0.999999999, NA, NA, 80.269999999, NA, 6.893087938, NA, 0.000348246902456983,
NA, 4.99910538457899, NA, 7.884799999, 0.000856325678515068,
43.2590098577311, NA, 2e-05, NA, 0.001785, NA, NA, NA, NA, 31.648,
853.350000001, NA, 0.07874799999, NA, 238.27499995, NA, 0.296050683964726,
2.07162642857143, NA, 0.002, NA, 2.06793155574199, NA, 238.274831403096,
NA, NA, 0.999999999, NA, NA, NA, 1841.74060340376, NA, 2.315499999,
NA, 4.287549999, NA, NA, 2.943999999, NA, 2.7, NA, 15.309999999,
NA, 0.415349999, NA, 0.869565218147448, NA), `1978M3` = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 2.30889797598868,
NA, 177.721, NA, NA, 6.16181818145455e-12, NA, 14.564999999,
NA, 4.949999999, NA, 0.387852461074294, NA, 229.024837946203,
NA, 229.024837946203, NA, 7.820999999, 0.538706028410659, NA,
NA, 2, NA, 1.672899999, NA, 229.02499995, NA, 2.6956330249638e-12,
NA, 15.414499999, NA, 2.7, NA, 31.479999999, NA, 38.0835, NA,
484, NA, 2.9918e-08, NA, 0.874814102003324, NA, 229.02276931855,
NA, 5.563999999, NA, 0.828157350582325, NA, 0.032600499999, NA,
6.9669, NA, 5.307999999, NA, 2.069999999, NA, 70.474999999, NA,
1.1339, 229.024837946203, NA, 229.025000113121, NA, 229.024837946203,
NA, 19.9611068835304, NA, 2.7, NA, 8.43348, NA, 3.924999999,
NA, 2.7, NA, 1, NA, 2.54699999958993, NA, 2.011299999, NA, 229.025000113121,
NA, NA, NA, NA, 8.43348, NA, 4.004999999, NA, NA, NA, 0.379650721480505,
NA, 200, NA, 222.399999999, NA, 7.21e-09, NA, 229.024837946203,
NA, 20.399999999, NA, 852.5, NA, 2.5249999999e-05, NA, 30.219999999,
NA, NA, NA, 90, NA, 8.569999999, NA, 24.999999999, NA, 4.165999999,
NA, 0.000114999367635727, NA, 415, NA, 0.746948715059195, NA,
NA, NA, 1.868499999, NA, NA, NA, 229.024837946203, NA, 38.42,
NA, NA, NA, 0.275603571898248, 0.869565218147448, NA, 0.00164036949811306,
NA, 0.391304999, NA, 4.580499999, NA, 2.499999999, NA, 4.625,
NA, NA, NA, 229.025000113121, NA, 33.789999999, 2.7, NA, 2.549999999,
NA, 2.023, 0.863557858376511, NA, 36.921999999, NA, 45.80499999,
NA, 1.05000000042, NA, NA, 0.621813207312523, NA, 0.307995564958727,
NA, NA, 0.853399999, NA, 0.022742499999, 0.390945697795436, 38.999999999,
0.999999999, NA, NA, 80.023, NA, 7.182729084, NA, 0.000348246902456983,
NA, 4.99910538457899, NA, 7.820999999, 0.0008494011728951, 43.2590098577311,
NA, 2e-05, NA, 0.001785, NA, NA, NA, NA, 31.479999999, 852.5,
NA, 0.07820999999, NA, 229.02499995, NA, 0.296050683964726, 2.07162642857143,
NA, 0.0018, NA, 2.15482411712509, NA, 229.024837946203, NA, NA,
0.999999999, NA, NA, NA, 1841.74060340376, NA, 2.308599999, NA,
4.229599999, NA, NA, 2.927499999, NA, 2.7, NA, 15.574999999,
NA, 0.416249999, NA, 0.869565218147448, NA), `1978M4` = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 2.3305007639567,
NA, 177.721, NA, NA, 6.27818181818182e-12, NA, 14.882499999,
NA, 4.959999999, NA, 0.387852461074294, NA, 230.599836832106,
NA, 230.599836832106, NA, 7.891699999, 0.546060176129558, NA,
NA, 2, NA, 1.7133, NA, 230.59999995, NA, 2.7295330211277e-12,
NA, 15.347799999, NA, 2.7, NA, 32.278, NA, 38.0835, NA, 484,
NA, 2.9918e-08, NA, 0.880126739024931, NA, 230.597753978545,
NA, 5.644999999, NA, 0.828157350582325, NA, 0.032600499999, NA,
7.038, NA, 5.402499999, NA, 2.069999999, NA, 70.474999999, NA,
1.12980001, 230.599836832106, NA, 230.600000114243, NA, 230.599836832106,
NA, 20.1333524046585, NA, 2.7, NA, 8.580009999, NA, 3.924999999,
NA, 2.7, NA, 1, NA, 2.5649999995871, NA, 2.011299999, NA, 230.600000114243,
NA, NA, NA, NA, 8.580009999, NA, 4.008999999, NA, NA, NA, 0.387672029613364,
NA, 200, NA, 222.899999999, NA, 7.61e-09, NA, 230.599836832106,
NA, 20.399999999, NA, 867, NA, 2.5249999999e-05, NA, 30.979999999,
NA, NA, NA, 90, NA, 8.569999999, NA, 24.999999999, NA, 4.220999999,
NA, 0.000114999367635727, NA, 415, NA, 0.752202072130313, NA,
NA, NA, 1.932999999, NA, NA, NA, 230.599836832106, NA, 38.58,
NA, NA, NA, 0.27714649971652, 0.869565218147448, NA, 0.00167126615039589,
NA, 0.391304999, NA, 4.611999999, NA, 2.499999999, NA, 4.634,
NA, NA, NA, 230.600000114243, NA, 35.339999999, 2.7, NA, 2.549999999,
NA, 2.067799999, 0.871156024043906, NA, 37.570999999, NA, 46.11999999,
NA, 1.05000000042, NA, NA, 0.621156593963076, NA, 0.312998842002253,
NA, NA, 0.859699999, NA, 0.022743199999, 0.396118043333776, 37.829999999,
0.999999999, NA, NA, 80.836999999, NA, 7.280784142, NA, 0.000348246902456983,
NA, 4.99910538457899, NA, 7.878699999, 0.000857074291934138,
43.2590098577311, NA, 2e-05, NA, 0.001785, NA, NA, NA, NA, 32.278,
867, NA, 0.07878699999, NA, 230.59999995, NA, 0.296050683964726,
2.07162642857143, NA, 0.0018, NA, 2.18424070809641, NA, 230.599836832106,
NA, NA, 0.999999999, NA, NA, NA, 1841.74060340376, NA, 2.330199999,
NA, 4.278899999, NA, NA, 2.931499999, NA, 2.7, NA, 15.899999999,
NA, 0.423399999, NA, 0.869565218147448, NA)), row.names = c(NA,
335L), class = "data.frame")
理想情况下,我想要一个包含列、国家/地区、期间、指标和值的数据框,指标值如下。
理想情况下,我想要像你从中得到的东西,但对于所有指标
library(imfr)
gdp_data=imf_dataset("IFS",freq = c("Q"), indicator = "NGDP_R_SA_XDC",start_year = 1980, times = 10)
在这种情况下,
pivot.longer
就是正确的选择。假设您的 data.frame 是 dat
:
library(tidyr)
library(dplyr)
dat %>%
mutate(`1977M12` = as.numeric(`1977M12` ),
`1978M1` = as.numeric(`1978M1`)) %>%
pivot_longer(`1977M11`:`1978M4`, names_to = "Period") %>%
select(-Country.Code)