burt                  package:amap                  R Documentation

_C_o_m_p_u_t_e _b_u_r_t _t_a_b_l_e _f_r_o_m _a _f_a_c_t_o_r _d_a_t_a_f_r_a_m_e.

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

     matlogic returns for all variables a matrix of logical values for
     each levels. burt is defined as t(matlogic).matlogic

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

     burt(x)
     matlogic(x)

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

       x: A dataframe that contents only factors

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

     Antoine Lucas, <URL:
     http://mulcyber.toulouse.inra.fr/projects/amap/>

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

     color <- as.factor(c('blue','red','red','blue','red'))
     size <- as.factor(c('large','large','small','medium','large'))
     x <- data.frame(color,size)

     matlogic(x)
     ##  color.blue color.red size.large size.medium size.small
     ##1          1         0          1           0          0
     ##2          0         1          1           0          0
     ##3          0         1          0           0          1
     ##4          1         0          0           1          0
     ##5          0         1          1           0          0

     burt(x)
     ##              color.blue color.red size.large size.medium size.small
     ##  color.blue           2         0          1           1          0
     ##  color.red            0         3          2           0          1
     ##  size.large           1         2          3           0          0
     ##  size.medium          1         0          0           1          0
     ##  size.small           0         1          0           0          1

