How to get the table with the data that generates the graph with the DECOMPOSE command in the R

2

Good afternoon, everyone. I generated this chart with the "decompose" command in R. What I would like to know is how to extract the data from each of these components into a table. For example, I want to generate the "random" chart in Excel and I need the data from this series.

    
asked by anonymous 13.09.2017 / 21:44

1 answer

3

Following the help of the function decompose

require(graphics)

m <- decompose(co2)
plot(m)

If you use names(m) you will see that 6 "objects" are saved within m : x , seasonal , trend , random , figure and type . Now you only have to select the data of your interest with the $ operator. In case of your doubt,

m$random
    
13.09.2017 / 22:43