这是我的数据。
Country Code Year GDP Growth CPI Imports Exports Population
Afghanistan AFG 1960 537777811 NA NA 7.024793 4.132233 8996351
Afghanistan AFG 1961 548888896 NA NA 8.097166 4.453443 9166764
Afghanistan AFG 1962 546666678 NA NA 9.349593 4.878051 9345868
Afghanistan AFG 1963 751111191 NA NA 16.863910 9.171601 9533954
Afghanistan AFG 1964 800000044 NA NA 18.055555 8.888893 9731361
Afghanistan AFG 1965 1006666638 NA NA 21.412803 11.258279 9938414
b <- global_economy %>%
mutate(GDP_per = GDP/Population)
gg_season(b,GDP_per,period="year")
Error: The data must contain at least one observation per seasonal period.
Traceback:
- gg_season(b, GDP_per, period = "year")
- abort("The data must contain at least one observation per seasonal period.")
- signal_abort(cnd)
我想画图所有国家的GPD_per 随时间变化的图,试过autoplot也不行,求助!