public
Created

country plot code

  • Download Gist
country.r
R
1 2 3 4 5 6 7
library(xlsx)
cdat <- read.xlsx(file="~/datasets/ReinhardRogoff/18_data.xls",sheetName="Aut.Ita.UK.US")
cdat <- cdat[,-c(5,6,7)]
library(reshape)
library(ggplot2)
m <- melt(cdat,c("Year","Country"))
p <- ggplot(m,aes(x=Year,y=value)) + geom_line(aes(color=variable),size=1) + facet_wrap(~Country,ncol=1) + scale_y_continuous(name="Public (Public and Private) debt to GDP (GNP) ratios") + theme(legend.position="top")

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.