hadamard               package:survey               R Documentation

_H_a_d_a_m_a_r_d _m_a_t_r_i_c_e_s

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

     Returns a Hadamard matrix of dimension larger than the argument.
     Matrices of dimension every multiple of 4 are thought to exist,
     but this function doesn't know about them, so it will return
     matrices that are larger than necessary.

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

     hadamard(n)

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

       n: lower bound for size 

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

     A Hadamard matrix

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

     'brrweights'

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

     image(hadamard(30))

     plot(sapply(2:80,function(i) ncol(hadamard(i))),type="S",
          ylab="Matrix size",xlab="n",xlim=c(1,100),ylim=c(1,100))
     abline(0,1,lty=2)
     lines(2:80, 2:80-(2:80 %% 4)+4,col="purple",type="S")
     legend(c(x=10,y=80),legend=c("Actual size","Minimum possible size"),
          lty=c(1,1),col=c("black","purple"),bty="n")

