rename_#
- swordfish.function.rename_()#
For a vector, assign a new name.
For a matrix, add or change columns names or row names.
For a table, rename the columns.
- Parameters:
a (Constant) –
A vector, regular/indexed matrix, in-memory table, or DFS table (for OLAP engine only).
When a is a vector, b is a string/symbol.
When a is a matrix, if c is not specified, b is the column lables; if c is specified, b is the row labels and c is the column lables. Column and row labels must match the respective dimensions of a. b and c could be data of any types. Note that for an indexed matrix, b and c must be strictly increasing vectors, otherwise an error will be thrown.
When a is an in-memory table, b and c is a string scalar or vector. If c is not specified, b is new column names starting from the first column on the left; if c is specified, b is the old column names and c is the corresponding new column names. Users should make sure the number of new or old column names be less than or equal to the total number of columns in the table.
When a is a DFS table, b and c must be a string. If c is not specified, b is new column names starting from the first column on the left; if c is specified, b is the old column names and c is the corresponding new column names. Users should make sure the number of new or old column names be less than or equal to the total number of columns in the table;