zoo                   package:zoo                   R Documentation

_Z'_s _O_r_d_e_r_e_d _O_b_s_e_r_v_a_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     'zoo' is the creator for an S3 class of indexed totally ordered
     observations which includes irregular time series.

_U_s_a_g_e:

     zoo(x, order.by)

_A_r_g_u_m_e_n_t_s:

       x: a vector or matrix.

order.by: a vector by which the observations in 'x' are ordered.

_D_e_t_a_i_l_s:

     'zoo' is still under development, but it provides 'plot' and
     'index' (or 'time') methods for '"zoo"' objects and can convert
     '"ts"' and '"irts"' objects with 'as.zoo'.

     The vector of indexes 'order.by' can be of arbitrary class, but it
     is essential that 'order(order.by)' works. For other functions it
     is assumed that 'c()', 'length()' and subsetting '[,' work.

_V_a_l_u_e:

     A vector or matrix with an '"index"' attribute of the same
     dimension ('NROW(x)') by which 'x' is ordered.

_S_e_e _A_l_s_o:

     'plot.zoo', 'index', 'merge.zoo'

_E_x_a_m_p_l_e_s:

     x.date <- as.POSIXct(paste("2003-02-", c(1, 3, 7, 9, 14), sep = ""))
     x <- zoo(rnorm(5), x.date)
     plot(x)

     time(x)

     x[1:3]

