What is the difference between a zoo and ts in R?

I want to know the differences in the use of the function ts()or zoo().

+4
source share
1 answer

The zoo object has time values ​​(possibly irregular) in the index attribute displayed as the name of the line in the console by the method print.zoo, and values ​​in the matrix or atomic vector, which sets restrictions on the values ​​that can be (usually numerical, but always all single-mode, i.e. E. Not as a list with several modes, for example, with a frame). With pkg: zoo loaded, to get a list of functions with zoo methods:

library(zoo)
methods(class="zoo")

yrmon - . :

methods(class="yearmon")

xts - , . SO zoo xts.

A ts - , , , . , , "", "" "", , . ts- ( ):

methods(class="ts")

its , , , -, .

+9

Source: https://habr.com/ru/post/1615918/


All Articles