table flip selected rows
This function flips (i.e. mirrors) selected rows in the table
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 - 4
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. |
Type | Description |
---|---|
numeral | Number of rows deleted Number of rows deleted. -1 is returned if table is empty. |
table initialize( t,
{ { Last Name, First Name, Age },
{ Andersen, Anders, 30 },
{ Donaldson, Donald, 20 },
{ Johansson, John, 40 },
{ Poulsen, Paul, 50 },
{ Svensson, Sven, 10 } } );
echo("Before flipping:");
table list ( t );
a[] = table flip selected rows ( t, [Age]>=30 );
echo("Rows flipped: ", a[]);
table list ( t );
Before flipping:
0 : Last Name | First Name | Age
1 : Andersen | Anders | 30
2 : Donaldson | Donald | 20
3 : Johansson | John | 40
4 : Poulsen | Paul | 50
5 : Svensson | Sven | 10
Rows flipped: 1
0 : Last Name | First Name | Age
1 : Poulsen | Paul | 50
2 : Donaldson | Donald | 20
3 : Johansson | John | 40
4 : Andersen | Anders | 30
5 : Svensson | Sven | 10
table flip rows
table flip vertically
table flip columns
table transpose