This dialog allows strings within a text or factor column to be split into
several new columns. The breaks in the text can be specified using specific
characters (delimiters) or a specified location. The text items resulting from
splitting the text up can be truncated to a specific length using the width
specification for each result column or have extra spaces removed from it.
The resulting columns can be automatically converted into variates.
One application of this menu is to split a factor with two part labels into
two factors whose levels are specified by the first and second parts
respectively. For example a factor with labels 'N5', 'N10,' 'P5', 'P10'
could be converted into two factors with labels 'N', 'P' and '5', '10'
respectively.
Split Column
A drop down list of the current columns in the spreadsheet (text or factors)
that can be split. Select the column that you want to split using this list.
Split Using
These options specify how to split the text in each cell into the new
columns. The options are:
| Space delimiter | Split the text using spaces, e.g. 'A B C' would split to 'A', 'B', 'C' |
| Comma delimiter | Split the text using commas, e.g. 'A,B,C' would split to 'A', 'B', 'C' |
| Other delimiters | Split the text using delimiters specified in the Separator List. |
| Specified Positions | Split the text at specified positions, e.g. the string 'ABCDE'
split at positions 1, 2 and 5 would result in 'A', 'BCD' and 'E'. The positions should be specified in the
Position list and the direction of counting is specified using the
Count Position from option below. |
| String delimiter | The complete string entered in Separator String is
used to split the text. For example, if 'to' was entered as the separator string then 'Medium to High' would be split to
'Medium' and 'High' (with spaces trimmed as described below). |
Position List
Provides a space for you to specify a comma or space separated list of numbers to identify the positions where to split the text.
For example, the list 1,2,4 would split the string 'ABCDE' into 'A','BC' and 'DE'.
Separator List
This specifies a string of characters that specify where the breaks are to occur. For example, +-= would split '2+3=5' to '2',
'3' and '5' (if the delimiters are not being retained as part of the split text).
Separator String
This specifies the String delimiter option, that specifies where the breaks are to occur.
For example, 'and' would split '1 and 2 and 3' to '1', and spaces where trimmed.
Treat Multiple delimiters as one
One or more delimiters (e.g. multiple spaces) are treated as a single break point in splitting the text. For example, if the
delimiter is a space then the string 'A B' would be split into two items 'A' and 'B'. However, if this
item was not selected then, 'A B' would be split into three items 'A',' ' and 'B' (the second split is a single space).
Keep delimiters
When selected, each delimiter will be retained in the split text. For example, if the string 'A+B' is split using the separator '+', then
this would be split into 'A+' and 'B'. You can choose whether to include the separator on the left
or right of the split text using the Delimiter stays on option.
Delimiter stays on
When the Keep delimiters option is selected, this specifies whether the delimiter is to be retained on
the Left or Right of the split at that position. For example, if
Left is selected and the delimiter is a ':' then the string 'A:B' would be split into 'A:' and 'B'.
Alternatively, if Right is selected then the string 'A:B' would be split into 'A' and ':B'.
Count Position from
This specifies whether the positions are counted from the Left or Right of the
text. For example, in 'ABCDE', 'A' is in position 1 when counted from the left, and in position 5 when counted from the right.
Number of Splits to save
This specifies the number of splits to save. If a text splits into more items than specified here, then the splits exceeding this
number will be discarded. If fewer items are created, the columns after this will contain blank entries.
Column names
Allows you to select or provide a name of a column to save the split text into. If a column already exists in the spreadsheet, then
a warning will appear before any column is over written.
Width
Setting this item for each column specifies a maximum width of the resulting text items. Items longer than with will be truncated to
this length.
Change Text Case in New Columns
These options control how the case of the text in the new columns is changed:
| Unchanged | The case of the text is unchanged from the original column. |
| Lower | The case of the text is changed to lower case (e.g. 'ABC' -> 'abc'). |
| Upper | The case of the text is changed to upper case (e.g. 'abc' -> 'ABC'). |
| Title | The case of the text is changed to title case, where the first
letter in each word (i.e. the first character, and those following a space)
are made Upper case and all other lower case (e.g. 'ABC' -> 'Abc', 'low rate' -> 'Low Rate'). |
Trim spaces from split columns
Selecting this item removes leading, trailing and duplicate spaces from the resulting split up text.
Convert Saved columns to Factors
Selecting this option converts the resulting text columns into factors with labels.
Apply
Use the specified criterion to split the text from the column and leave the dialog open for another split operation.
Clear
Clear any edit fields that have been filled in.
OK
Use the specified criterion to split the columns into the new columns and close the dialog.
Cancel
Close the dialog without making any changes.
See Also
The CONCATENATE directive can be used within the command language
to provide some of this functionality. To split at using delimiters, the
GETPOSITION function of
CALCULATE can be used to obtain the position of these for use in
CONCATENATE.