2.2.3.71 wstackcol
Menu Information
Restructure: Stack Columns
Brief Information
Stack data from multiple columns using group identifiers
Command Line Usage
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;
X-Function Execution Options
Please refer to the page for additional option switches when accessing the x-function from script
Variables
Display Name
|
Variable Name
|
I/O and Type
|
Default Value
|
Description
|
Input Stack Column(s)
|
irng
|
Input
Range
|
<active>
|
Specify at least two columns for the source data.
|
Group Identifier
|
tr
|
Input
TreeNode
|
<unassigned>
|
This is a tree for group identifier settings.
identifiers: Group Row(s)
- Select the column label rows which contain the group information. With this information, the tool identifies the group to which the samples belong. In the GUI, the text box will list all the column label rows (including User Defined Parameter) in the original worksheet. This allows the selection of multiple rows. Possible options include the following, depending on whether the label row is shown in the original worksheet:
- Short Name
- Use the column's Short Name as grouping identifier.
- Long Name
- Use the column's Long Name as grouping identifier.
- Units
- Use the column's Units as grouping identifier.
- Comments
- Use the column's Comments as grouping identifier.
- UserDefined
- Use the column's User Defined Parameter as grouping identifier.
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., tr.identifiers:={L, U} means Long Name and Units label rows are used as group identifier; for Short Name, use G ).
|
Include Other Column(s)
|
include
|
Input
Range
|
<optional>
|
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
|
2
|
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
|
0
|
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
|
0
|
Specify whether to ignore rows with missing values in the source columns.
|
Group Column Long Name
|
gln
|
Input
string
|
<Group Row Header>
|
Specify the long name for the group column. Options include:
- <Group Row Header>
- The row header from which the group information is taken. See Group Identifier, above.
- Group
- Show the Group string with an enumerated number, such as "Group1", "Group2", etc.
- Class
- Show the Class string with an enumerated number, such as "Class1", "Class2", etc.
You may also use a custom string with an enumerated number for the Long Name.
|
Data Column Long Name
|
dln
|
Input
string
|
Data
|
Enter the Long Name for the output data column. The Long Name will be enumerated.
|
Output Worksheet
|
ow
|
Output
Worksheet
|
<new>
|
Specify the worksheet for outputting the results.
|
Related X-Functions
wunstackcol
More Information
For more information, please refer to this page in our User Guide.
- How to Stack Columns
- Example
Keywords:combine
|