table transpose
This functions rarranges table contents from horizontal orientation to vertical orientatio. All prior row headers will move to the 1st column. On the other hand, all data in the 1st column become headers. Attention: Configuration settings applied wtih table configure() prior to this call will be discarded because the transposed table is actually a new table.
Indirect parameter passing is disabled
1-2
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table If only the 1st function parameter is provided, then this table will be transposed. If another table is named in the 2nd function parameter, then this table remains unchanged. |
Opt. 2. input |
string | Name of new table |
table initialize( t,
{ { Food, color, taste, best with },
{ Fries, golden yellow, salty, hamburger },
{ Pizza, colorful, tasteful },
{ Chianti, rubin red, bitter, pasta, worth enjoying },
{ Tirami sù,crème and brown,sweet } } );
table transpose ( t );
table list ( t );
0 : Food | Fries | Pizza | Chianti | Tirami sù
1 : color | golden yellow | colorful | rubin red | crème and brown
2 : taste | salty | tasteful | bitter | sweet
3 : best with | hamburger | | pasta |
4 : | | | worth enjoying |