Quandl with R


Install Quandl package from the respective GitHub repo.

library(devtools)
install_github("quandl/R-package")

Then load the Quandl package into R.

library(Quandl)

The Quandl function will allow you to download a dataset using its Quandl code.

myQuandlData <- Quandl("NSE/OIL", type="zoo")

Please note you can use type to get your data in the most convenient format.

We can plot our time series using ggplot 2.

Autoplot works here only because the zoo package was implicitly loaded into R with the Quandl package.

library(ggplot2)
autoplot(myQuandlData$Close) + ylab("Close")

plot of chunk unnamed-chunk-4