Changes column names in a CSV file given a reference file. Useful when having to change specific column names (but not others) and they do not follow any uniformed regular expression rules.
Version | 0.1 |
---|---|
Bundle | tools |
Categories | Convert |
Authors | Katherine Icay (katherine.icay@helsinki.fi) |
Issue tracker | View/Report issues |
Source files | component.xml renameCols.r |
Usage | Example with default values |
Name | Type | Mandatory | Description |
---|---|---|---|
in | CSV | Mandatory | File containing columns to rename. |
reference | CSV | Mandatory | File containing one column (oldNames ) with the current names to replace, and another column (newNames ) with the names to replace them with. |
Name | Type | Description |
---|---|---|
out | CSV | File with new column names. |
Name | Type | Default | Description |
---|---|---|---|
newNames | string | "" | Column of input reference containing the new names. Must be on the same row as the oldName to replace. If no value is given, the second column is selected by default. |
oldNames | string | "" | Column of input reference containing (at least, a partial match to) the current names. Must be on the same row as the newName replacing it. If no value is given, the first column is selected by default. |
Test case | Parameters▼ | IN in |
IN reference |
OUT out |
||
---|---|---|---|---|---|---|
case1 | properties | in | reference | out | ||
oldNames=old_columns, |