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

