table substitute vertically, table substitute vertically selected rows
These functions are the counterparts to table fill horizontally() and table fill horizontally selected rows(). Here, repetitions in rows will be replaced by blanks or substitute symbols of choice (e.g. ", see above, ditto, etc.)
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
2-5
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
Opt. 2. code |
expression :string |
Expression to select rows Applicable to table substitute vertically selected rows only: |
2. / 3. input |
table columns | Columns to substitute In these columns, rows with repeating contents will be substituted.
|
Opt. 3. / 4. input |
set or string | Substitution strings If one string is provided, then it will be used to substitute fields in all specified columns. If more strings are provided in a set, then they will
correspond with the columns specified. If the set contains fewer elements than the number of columns provided, then the last element
will apply for the remaining columns. Otherwise, if this set is longer, then the excess values will be ignored. |
Opt. 4. / 5. input |
string | Direction Following values are supported: up and down for repeating contents in upward resp. downward direction. Default value: down |
table initialize ( t, { {Name, Date, Tennis Scores},
{ Jim, "2020-06-20", "6:5 6:2 6:3" },
{ Jim, "2020-06-20", "7:6 6:4 5:6" },
{ Jim, "2020-06-21", "6:2 5:6 4:6" },
{ Jane, "2020-06-21", "5:4 6:5 7:6" },
{ Jane, "2020-06-21", "3:6 7:6 6:5" } } );
table copy table ( t, u );
echo("Original table: ");
table list( t );
echo("Substitution downward:");
table substitute vertically( t, {Name, Date}, { '"', '...' } );
table list( t );
echo("Substitution upward, Jim only:");
table substitute vertically selected rows ( u, [Name]==Jim, {Name, Date}, { '"', '...' }, up );
table list( u );
Original table:
0 : Name | Date | Tennis Scores
1 : Jim | 2020-06-20 | 6:5 6:2 6:3
2 : Jim | 2020-06-20 | 7:6 6:4 5:6
3 : Jim | 2020-06-21 | 6:2 5:6 4:6
4 : Jane | 2020-06-21 | 5:4 6:5 7:6
5 : Jane | 2020-06-21 | 3:6 7:6 6:5
Substitution downward:
0 : Name | Date | Tennis Scores
1 : Jim | 2020-06-20 | 6:5 6:2 6:3
2 : " | ... | 7:6 6:4 5:6
3 : " | 2020-06-21 | 6:2 5:6 4:6
4 : Jane | ... | 5:4 6:5 7:6
5 : " | ... | 3:6 7:6 6:5
Substitution upward, Jim only:
0 : Name | Date | Tennis Scores
1 : " | ... | 6:5 6:2 6:3
2 : " | 2020-06-20 | 7:6 6:4 5:6
3 : Jim | 2020-06-21 | 6:2 5:6 4:6
4 : Jane | 2020-06-21 | 5:4 6:5 7:6
5 : Jane | 2020-06-21 | 3:6 7:6 6:5