table rearrange selected rows
This function rearranges selected rows in the table in order to put them together into one block so they are no longer scattered across the table. The ordering of the selected rows will not change, but you can change it (before or) afterwards with table sort selected rows(). This function extracts a column from the table and places the values in the set from the selected rows where the calculated expression returns true. All blank or non-existing entries will be translated to blank strings. Automatic type conversion (e.g. numbers to numerals) can be adjusted with the table configure() function.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name and row number for selected function parameters
3
No. | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
1. input |
string | Name of existing table | ||||||||
2. code |
expression :string |
Expression to select rows Specify the conditions or rules to select the rows. See expressions to select rows. | ||||||||
3. input |
string | Relocation destination Use one of the following values:
|
table initialize( animals,
{ { Animal, Leg Count, Comment },
{ ant, 6 }, { rat, 4 }, { octopus, 8 }, { centipede, 100 }, { parakeet, 2 },
{ tick, 8 }, { orang utan, 2 or 4 }, { human, 2 }, { lobster, 8 }, { snake, 0 }, { dog, 4 },
{ cat, 4 }, { kangaroo, 2 or 4 }, { fly, 6 }, { alien, 3 }, { worm, 0 }, { emu, 2 } } );
table initialize( lookup, {
{ Condition, Todo },
{ "[Leg Count] = '*or*'", "[Comment] = 'Leg count probably unclear'" },
{ "[Leg Count] > 6", "[Comment] = 'Many legs'" },
{ "[Animal] = rat", "[Animal] = 'mouse'; [Comment] += 'not a rat'" },
{ "true", "[Animal] = ![Animal]" } } ); // Upper case O ALL
table manipulate( animals, lookup, Condition, Todo );
table list( animals );
0 : Animal | Leg Count | Comment
1 : Ant | 6 |
2 : Mouse | 4 | not a rat
3 : Octopus | 8 | Many legs
4 : Centipede | 100 | Many legs
5 : Parakeet | 2 |
6 : Tick | 8 | Many legs
7 : Orang utan | 2 or 4 | Leg count probably unclear
8 : Human | 2 |
9 : Lobster | 8 | Many legs
10 : Snake | 0 |
11 : Dog | 4 |
12 : Cat | 4 |
13 : Kangaroo | 2 or 4 | Leg count probably unclear
14 : Fly | 6 |
15 : Alien | 3 |
16 : Worm | 0 |
17 : Emu | 2 |