cont.table              package:corpora              R Documentation

_B_u_i_l_d _c_o_n_t_i_n_g_e_n_c_y _t_a_b_l_e _f_o_r _f_r_e_q_u_e_n_c_y _c_o_m_p_a_r_i_s_o_n (_c_o_r_p_o_r_a)

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

     This is a convenience function which constructs contingency tables
     needed for frequency comparisons with 'chisq.test' and
     'fisher.test'.

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

     cont.table(k1, n1, k2, n2)

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

      k1: frequency of a type in the first corpus

      n1: the size of the first corpus (sample size)

      k2: frequency of the type in the second corpus

      n2: the size of the second corpus (sample size)

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

     Because matrices cannot easily be vectorized, this function does
     not accept vector arguments and will abort with an error message
     in this case.

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

     A numeric matrix containing the two-by-two contingency table for
     the frequency comparison.

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

     Stefan Evert

_S_e_e _A_l_s_o:

     'chisq.test', 'fisher.test'

