Restructure: Stack Columns
Stack data from multiple columns using group identifiers
1. wstackcol irng:=(col(1):col(2)) tr.identifiers:={G};
2. wstackcol irng:=(1:end) tr.identifiers:={L} gln:=Class;
3. wstackcol irng:=(col(b):end) include:=col(a) method:=1 gln:=Group;
4. wstackcol irng:=(2:end) tr.identifiers:={L, U} include:=col(1) groups:=2 method:=1 gln:=Class;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input Stack Column(s) | irng |
Input Range |
|
Specify at least two columns for the source data. |
Group Identifier | tr |
Input TreeNode |
|
This is a tree for group identifier settings.
identifiers: Group Row(s)
If there are multiple rows selected in the Group Row(s) text box, the selected order of the groups will show in the lower text box. When scripting, you must specify the standard column label row characters with brackets (e.g., |
Include Other Column(s) | include |
Input Range |
|
Specify whether to include other column(s) in the output. With this selected, you can pick the columns to be included. |
Stack into Subgroups | groups |
Input int |
|
Specify whether to stack the original samples into several subgroups. If this is not selected, all of the input samples will be stored in one column only. With this selected, you can specify the number of subgroups, or the number of columns into which the samples are stacked.
Suppose there are six groups in the original data and you choose to stack them into two subgroups. The first, third, and fifth groups will be in the first subgroup, while the rest will be in the second. |
Stack by Rows | method |
Input int |
|
Specify whether to interlace samples from different groups.
Suppose there are two groups in the original dataset and this option is selected. The even rows in the output column will be samples that belong to the first group, while the odd rows will be samples from the second group. If this is not selected, the first n rows in the output column (n is the number of samples in the first group) will contain the samples from the first group, while the rest of the rows will contain the samples from the second group. |
Exclude Missing Rows | exclude |
Input int |
|
Specify whether to ignore rows with missing values in the source columns. |
Group Column Long Name | gln |
Input string |
|
Specify the long name for the group column. Options include:
You may also use a custom string with an enumerated number for the Long Name. |
Data Column Long Name | dln |
Input string |
|
Enter the Long Name for the output data column. The Long Name will be enumerated. |
Output Worksheet | ow |
Output Worksheet |
|
Specify the worksheet for outputting the results. |
For more information, please refer to this page in our User Guide.
Keywords:combine