How do I convert a daily dataset to a monthly download in R?

To change the frequency at which your data is sampled, do this:

mydata = Quandl("NSE/OIL", collapse="monthly") 		
# collapse can be "weekly" or "monthly" or "quarterly" or "annual"
The above call, if applied to a daily or weekly dataset, will return end-of-month values for that dataset.  It will have not affect a quarterly or annual dataset,
Note that the values returned are strictly those from the last observation date for that month. So if you are looking at an OHLC dataset (eg. stock prices), the "monthly" observations will show the Open, High Low and Close values on the last day of the month.  

Still need help? Contact Us Contact Us