inst/doc/maddison_project_database.R

## ---- warning = FALSE, message = FALSE----------------------------------------
library(maddison)
library(ggplot2)

str(maddison)
head(maddison)

## ---- fig.width = 6, fig.height = 4, warning = FALSE, message = FALSE---------
df <- subset(maddison, 
             year >= 1800 &
             iso2c %in% c("DE", "FR", "IT", "UK", "US"))

ggplot(df, aes(x = year, y = rgdpnapc, color = country)) +
  geom_line() +
  scale_y_log10() +
  theme_bw() +
  labs(x = NULL, y = "GDP per capita (2011 U.S. dollars)\n", color = NULL,
       title = "GDP per capita (1800-2010)")

Try the maddison package in your browser

Any scripts or data that you put into this service are public.

maddison documentation built on May 1, 2022, 5:07 p.m.