t                    package:base                    R Documentation

_M_a_t_r_i_x _T_r_a_n_s_p_o_s_e

_D_e_s_c_r_i_p_t_i_o_n:

     Given a matrix or `data.frame' `x', `t' returns the transpose
     (matrix or data.frame) of `x'.

_U_s_a_g_e:

     t(x)

_A_r_g_u_m_e_n_t_s:

       x: a matrix or data frame.

_S_e_e _A_l_s_o:

     `aperm' for permuting the dimensions of arrays.

_E_x_a_m_p_l_e_s:

     a <- matrix(1:30, 5,6)
     ta <- t(a) ##-- i.e.,  a[i, j] == ta[j, i] for all i,j :
     for(j in seq(ncol(a)))
       if(! a[, j] == ta[j, ]) stop("wrong transpose")

