isSymmetric               package:base               R Documentation

_T_e_s_t _i_f _a _M_a_t_r_i_x _o_r _o_t_h_e_r _O_b_j_e_c_t _i_s _S_y_m_m_e_t_r_i_c

_D_e_s_c_r_i_p_t_i_o_n:

     Generic function to test if 'object' is symmetric or not.
     Currently only a matrix method is implemented.

_U_s_a_g_e:

     isSymmetric(object, ...)
     ## S3 method for class 'matrix':
     isSymmetric(object, tol = 100 * .Machine$double.eps, ...)

_A_r_g_u_m_e_n_t_s:

  object: any R object; a 'matrix' for the matrix method.

     tol: numeric scalar >= 0.  Smaller differences are not considered,
          see 'all.equal.numeric'.

     ...: further arguments passed to methods; the matrix method passes
          these to 'all.equal'.

_D_e_t_a_i_l_s:

     The 'matrix' method is used inside 'eigen' by default to test
     symmetry of matrices _up to rounding error_, using 'all.equal'. 
     It might not be appropriate in all situations.

_V_a_l_u_e:

     logical indicating if 'object' is symmetric or not.

_S_e_e _A_l_s_o:

     'eigen' which calls 'isSymmetric' when its 'symmetric' argument is
     missing, as per default.

_E_x_a_m_p_l_e_s:

     isSymmetric(D3 <- diag(3)) # -> TRUE

     D3[2,1] <- 1e-100
     D3
     isSymmetric(D3) # TRUE
     isSymmetric(D3, tol = 0) # FALSE for zero-tolerance

