Recapitulare xts și funcția plot()

Vizualizarea seriilor de timp în R

Arnaud Amsellem

Quantitative Trader and creator of the R Trader blog

Recapitulare xts

  • O clasă specială de obiecte pentru serii de timp
  • eXtensible Time Series
  • xts = Index de timp + Matrice
  • Indexul este un obiect temporal: Date, POSIX Time, timeDate, chron

ch1_vid1_slides.003.png

Vizualizarea seriilor de timp în R

plot() și plot.xts()

  • plot()
  • plot.xts()
  • plot() poate fi folosit în locul plot.xts() când obiectul de reprezentat este de tip xts
Vizualizarea seriilor de timp în R

Utilizarea funcției plot()

ch1_vid1_slides.010.png

plot(my_ts)
Vizualizarea seriilor de timp în R

Utilizarea funcției plot()

ch1_vid1_slides.013.png

plot(my_ts, main = "my first time series")
lines(my_ts, col = "red", lwd = 2)
Vizualizarea seriilor de timp în R

Utilizarea funcției plot()

ch1_vid1_slides.022.png

plot(my_ts, main = "my first time series", 
            sub = "from Sep. 2008 to Dec. 2016")
lines(my_ts, col = "red", lwd = 2)
Vizualizarea seriilor de timp în R

Să exersăm!

Vizualizarea seriilor de timp în R

Preparing Video For Download...