index                  package:zoo                  R Documentation

_E_x_t_r_a_c_t_i_n_g _I_n_d_e_x _F_r_o_m _O_b_j_e_c_t_s

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

     'index' is a generic function for extracting  the index of an
     object.

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

     index(x, ...)

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

       x: an object,

     ...: currently not used.

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

     'index' is a generic function for extracting the index of objects,
     currently it has a default method and a method for 'zoo' objects
     which is the same as the 'time' method for 'zoo' objects.

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

     'time', '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)
     index(x)

     x <- matrix(rnorm(10), ncol = 2)
     index(x)

