StructureClasses           package:methods           R Documentation

_C_l_a_s_s_e_s _C_o_r_r_e_s_p_o_n_d_i_n_g _t_o _B_a_s_i_c _S_t_r_u_c_t_u_r_e_s

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

     The virtual class 'structure' and classes that extend it are
     formal classes analogous to S language structures such as arrays
     and time-series

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

     ## The folowing class names can appear in method signatures,
     ## as the class in as() and is() expressions, and, except for
     ## the classes commented as VIRTUAL, in calls to new()

     "matrix"
     "array"
     "ts"

     "structure" ## VIRTUAL

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s_e_s:

     Objects can be created by calls of the form 'new(Class, ...)',
     where 'Class' is the quoted name of the specific class (e.g.,
     '"matrix"'), and the other arguments, if any, are interpreted as
     arguments to the corresponding function, e.g., to function
     'matrix()'.  There is no particular advantage over calling those
     functions directly, unless you are writing software designed to
     work for multiple classes, perhaps with the class name and the
     arguments passed in.

_E_x_t_e_n_d_s:

     The specific classes all extend class '"structure"', directly, and
     class '"vector"', by class '"structure"'.

_M_e_t_h_o_d_s:

     _c_o_e_r_c_e Methods are defined to coerce arbitrary objects to these
          classes, by calling the corresponding basic function, for
          example, 'as(x, "matrix")' calls 'as.matrix(x)'. 

