table duplicate columns
This function duplicates specified columns to a destination column and assigns new header names accordingly. No existing columns will be overwritten. If the destination column is not at the end of the table, then the existing columns on the right will shift to the right in order provide space for the destination columns. In contrast to table copy columns, if a destination header name is already existing, existing columns remain untouched.
Indirect parameter passing is disabled
3, 4
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2 input |
table columns | Existing columns See table columns as function parameters for general ruling for this parameter.
|
3 input |
table columns | New header names See table columns as function parameters for general ruling for this parameter.
|
3 input |
table column | Destination column See table columns as function parameters for general ruling for this parameter.
|
Type | Description |
---|---|
numeral | Number of columns duplicated |
Table not found
Header name not found
table initialize ( table,
{ { First Name, Last Name, Given Name, Birth Year },
{ Abel, Adams, A., 1990 },
{ Betty, Beavers, B., 1995 },
{ Charlie, Collins, C., 2000 },
{ Daniela, Douglas, D., 2005 } } );
table duplicate columns( table, { Birth Year, Given Name }, { BY, GN }, First Name );
table list( table );
0 : BY | GN | First Name | Last Name | Given Name | Birth Year
1 : 1990 | A. | Abel | Adams | A. | 1990
2 : 1995 | B. | Betty | Beavers | B. | 1995
3 : 2000 | C. | Charlie | Collins | C. | 2000
4 : 2005 | D. | Daniela | Douglas | D. | 2005