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 following 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)'. 

