structure                package:base                R Documentation

_A_t_t_r_i_b_u_t_e _S_p_e_c_i_f_i_c_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     'structure' returns the given object with further  attributes set.

_U_s_a_g_e:

     structure(.Data, ...)

_A_r_g_u_m_e_n_t_s:

   .Data: an object which will have various attributes attached to it.

     ...: attributes, specified in 'tag=value' form, which will be
          attached to data.

_D_e_t_a_i_l_s:

     Adding a 'tsp' attribute will ensure that the object returned
     inherits from class '"ts"', and adding a 'levels' attribute
     ensures that the returned object is a factor.  These conversions
     are deprecated: they give a warning and will be removed in R
     2.5.0.

     For historical reasons (these names are used when deparsing),
     attributes '".Dim"', '".Dimnames"', '".Names"', '".Tsp"' and
     '".Label"' are renammed to '"dim"', '"dimnames"', '"names"',
     '"tsp"' and '"levels"'.

     It is possible to give the same tag more than once, in which case
     the last value assigned wins.  As with other ways of assigning
     attributes, using 'tag=NULL' removes attribute 'tag' from '.Data'
     if it is present.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'attributes', 'attr'.

_E_x_a_m_p_l_e_s:

     structure(1:6, dim = 2:3)

