Extract.brob         package:hyperdirichlet         R Documentation

_E_x_t_r_a_c_t _o_r _R_e_p_l_a_c_e _p_a_r_a_m_e_t_e_r_s _o_f _a _h_y_p_e_r_d_i_r_i_c_h_l_e_t _o_b_j_e_c_t

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

     Methods for '"["' and  '"[<-"', i.e., extraction or subsetting of
     hyperdirichlet objects.

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

       x: Object of class hyperdirichlet

       i: elements to extract or replace

   value: replacement value

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

     Always returns an object of class hyperdirichlet.

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


        *  x[i]

        *  x[i] <- value

_N_o_t_e:

     The replacement method '[<-' invokes the validity checking
     method '.hd.valid()' by default; this may be time-consuming for
     hyperdirichlet objects of high dimension.

     Users may use the functional form for replacement to override this
     behaviour; the method takes 'recalculate' and a 'validated'
     arguments, defaulting to 'FALSE', that may be set if desired.

_A_u_t_h_o_r(_s):

     Robin K. S. Hankin

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

     a <- uniform(4)
     a[5] <- 1.2

     ## Not run: 
     a <- as.hyperdirichlet(a, TRUE)  # recommended way to calculate NC
     ## End(Not run)

