flip. Transposing a table

^table.flip[]   

The method creates a new table
nameless with entries resulted from transposing a table. That means, the method turns columns of the given table into rows and rows into columns.

Example
$words[^table::create{id   number
Zero   01
One   02
Two   03
Three      04
}]
$fliped[^
words.flip[]]
^
words.save[words.txt]

As the result of the code, the following table will be saved as a file named
flipped.txt:

0

1

2

3

Zero

One

Two

Three

01

02

03

04




Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 21.09.2007