tframe                package:tframe                R Documentation

_E_x_t_r_a_c_t _o_r _S_e_t _a _t_f_r_a_m_e

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

     The first usage extracts the tframe from a tframed object.  These
     are generic functions. The default method attempts to build a
     tframe for time series, matrix, or array which is not tframed. The
     second usage assigns the tframe to an object.

     There should be  1/ methods for classes like TSdata, ts, rts 2/
     the default should work for "true tframe" methods 3/ the default
     should kludge for old tsp

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

         tframe(x)
         tframe(x)
         tframe(x)

         tframe(x) <- value

         is.tframe(tf)

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

       x: a tframed object or an object to be tframed.

   value: a tframe.

      tf: any object.

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

     The first usage returns the tframe of a tframed object. The second
     usage sets the tframe of an object. `is.tframe' returns a logical.

     The true tframe approach is to set a "tframe" attribute for an
     object. This attribute has a class which indicates the time
     framing which is used. The  the time frame information is often
     secondary, in the sense that it does not describe the object
     structure, but only provide some additional information which is
     useful for plots and when printing the object. By putting this in 
     an attribute, the objects class can be used in the more usual way,
     for indicating information about the structure of the object.  For
     these true tframe objects the default `tframe' and code{tframe<-}
     will often be adequate. The generic/method approach allows for
     special case (like TSdata where the tframe information is not an
     attribute of the object, but rather an attribute of the data
     matrices which are elements of the object).

     The generic/method approach also allows for (faking) tframe
     assignment and  extraction with classes like rts, ctc, its, ts,
     and others which may appear, that try to make the time description
     part of the object class. (Not  a "tframe" approach.) The problem
     is to extract real tframes and also fake these other classes and
     old style tsp objects so they look  like tfamed objects. Another
     approach would be to mutilate these objects  and force them really
     be tframed objects (to have a tframe attribute),  but that risks
     conflicting with other (non tframe) code which used  the objects.
     This faking is accomplished by specific methods of the classes,
     and for old style tsp objects it is built into the default.

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

     Depends.

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

     `tframed'

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

         z <- tframe(ts(rnorm(100), start=c(1982,1), frequency=12))
         is.tframe(z)

