Search notes:

R function: t

m <- matrix( c(   1,    2,
                 11,   22,
                111,  222,
               1111, 2222),
              nrow=2)

m
#      [,1] [,2] [,3] [,4]
# [1,]    1   11  111 1111
# [2,]    2   22  222 2222

cat("\n\n")

t(m)
#      [,1] [,2]
# [1,]    1    2
# [2,]   11   22
# [3,]  111  222
# [4,] 1111 2222

colnames(m) <- paste('Col ', seq(1,4))
rownames(m) <- paste('Row ', seq(1,2))
t(m)
#        Row  1 Row  2
# Col  1      1      2
# Col  2     11     22
# Col  3    111    222
# Col  4   1111   2222
Github repository about-r, path: /functions/t.R

See also

Matrix operations
Index to (some) R functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200860, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/t(68): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78