create. Creating an object based on a specified table

^table::create{table_data} 
^table::create[nameless]{table_data}
^table::create{table_data}[format options]   [3.2.2]

The constructor creates an object of class
table, using table_data defined in the constructor itself.

Table_data-data provided in tab-delimited format, that is-the columns are separated by tab symbol, while rows are separated with a new line symbol. At that, the parts of the first row-divided by the tabulation-are regarded as columns' names and thus a named table is created. Blank lines are ignored. If you want to create a table without columns' names (which is actually NOT recommended), you should precede table data with option nameless. In this case, the constructor regards the columns of the first row as table data and instead of columns' names their ordinal numbers-starting with zero-will be used.

Example
$tab[^table::create{name   age
Bob   27
Alex   22

}]


A new object of class table-
tab-will be created, containing two rows with columns' name and age.


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