fbpx

Exporting time series data to csv in R for quant development

(Last Updated On: April 4, 2012)

Exporting time series data to csv in R for quant development

I am relatively new to R, but making progress learning. However, I met one challenge that so far I haven’t been able to overcome and I was wondering whether somebody here could help me.

I have done some work with time series and ended using the decompose() function. I would like to export this to a CSV so that I can import it into Excel or other tools. Unfortunately, a time series doesn’t seem to be a regular data frame and therefore I haven’t succeeded in exporting it with regular tools. Does anybody have a suggestion on how to approach this?

 
Convert the decompose() output in R to matrix format “output <- as.matrix(decompose.output)” and write it to csv format using “write.csv()”, though the suggested may not give you ready to use decompose outuput, but after some excel formatting/transposes the output can be obtained in useable format.

Added my two cents.

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
share this recipe:
Facebook
Twitter
Pinterest

Still hungry? Here’s more

Automated Bots: Your Key to Stock Trading Success

Automated bots are rapidly gaining ground in the stock market, and if you’re still trading manually, the box will outrun you. Yes, you heard it right! These powerful bots are set to become the new norm, and those who embrace them will have a significant advantage over those who don’t.

Read More

Are you interested in:

If so, CLICK HERE