Translate

Thursday, March 16, 2017

Historical U.S. Real GDP Growth Rates - Bar Chart created by R

The following R codes can generate the chart below. The code will bring the real GDP data from St Louis Fed website directly.
library (quantmod)
getSymbols('GDPC1', src='FRED' )
mydata2<-annualReturn(GDPC1)*100
barplot(mydata2, main='Real GDP Growth', col='red', xlab='Year')


No comments:

Post a Comment