library(WDI)
top10 = c('US', 'CN', 'JP', 'DE', 'FR', 'GB', 'BR', 'RU', 'IT', 'IN')
gdp = WDI(top10, indicator = "NY.GDP.MKTP.CD", start = 1980, end = 2012)
gdp = transform(gdp, NY.GDP.MKTP.CD = NY.GDP.MKTP.CD/10^9)

library(rCharts)
n1 <- nPlot(NY.GDP.MKTP.CD ~ year, data = gdp, group = 'country',
  type = 'stackedAreaChart', width = 800, height = 400
)
n1$yAxis(
  axisLabel = 'Billions of Dollars', 
  tickFormat = "#! d3.format('0.0f') !#"
)
n1