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:

Still hungry? Here’s more

Are you interested in:


FREE 2 Hour Video! 


As you know with the crazy restrictive emergency laws being introduced in the last week, many moving their savings out of FIAT banks into cryptocurrency trading.

Here are some questions to get your started:

  • Create your own ‘bank’ anonymously with crypto
  • In the future, draw off your crypto saving with a Visa debit card
  • Trade using a European de-central exchange to trade perpetual contracts and other high performing coins
(All your info is kept private nor released!  Don’t forget to check to click your promo or spam inbox after the confirmation email is sent) 

Create your own  PRIVATE Bank