cksum                 package:bitops                 R Documentation

_C_o_m_p_u_t_e _C_h_e_c_k _S_u_m

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

     return a cyclic redundancy checksum for each element in the
     argument.

_U_s_a_g_e:

     cksum(a)

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

       a: coerced to character vector

_D_e_t_a_i_l_s:

     NA's appearing in the argument are returned as NA's.

     The default calculation is identical to that given in pseudo-code
     in the ACM article (in the References).

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

     numeric vector of length 'a'.

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

     Steve Dutky sdutky@terpalum.umd.edu

_R_e_f_e_r_e_n_c_e_s:

     Fashioned from 'cksum(1)' UNIX command line utility, i.e., 'man
     cksum'.

     Dilip V. Sarwate (1988). Computation of Cyclic Redundancy Checks
     Via Table Lookup, _Communications of the ACM_, August 1988. *vol*
     31, No.8  page 1008-1013

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

        b <- "I would rather have a bottle in front of me than frontal lobotomy\n"
        cksum(b) == 1342168430 ## -> TRUE

