This dialog can be used to convert either the entire spreadsheet or columns of a vector spreadsheet to
other types.
Sheet Type
Converts the spreadsheet from one type to another.
The following restrictions apply to spreadsheet conversion:
- A Vector spreadsheet containing text columns cannot be converted to any
other type.
- Converting a spreadsheet to type scalar will preserve Row 1 and discard
all other rows.
- Spreadsheets can only be converted to diagonal or symmetric matrix type
if they are square, i.e. have equal numbers of rows and columns.
- Converting a spreadsheet to type vector will produce columns of type
variate. These can subsequently be converted to other types using the Edit
Column Attributes menu.
Column Type
Converts a column of a Vector spreadsheet to another type. The desired column
should be selected from the drop-down list above the list of column types.
- Variate columns are generated by taking the values as currently
displayed in the column. Factor labels or text values are converted to numbers
if possible, otherwise they are replaced by missing values.
- Factor columns are generated from variates by forming a set of
levels from the distinct set of values in the column. Similarly, factor labels
are formed from the distinct set of values in a text column.
- Text columns are generated by converting the values currently
displayed into strings.
- Units Vector columns are non-editable columns displayed next to the
row numbers and provide additional identification for the rows of a spreadsheet.
A Units Vector is formed using the currently displayed text or numeric values.
Matrix or Table Name
You can change the name of matrices or tables by typing the new name into this
box.
Factor Options
When factors are generated by converting columns of numbers or text, appropriate
sets of levels or labels are formed from the data. You can elect to have these
sorted into order.
Tolerance
A positive value in this edit box will be used as a tolerance in creating
levels from a factor. If two values differ by less than this tolerance,
the will be assigned to the same factor group. A value of 0 puts
all unique values into their own group. If the values have been calculated,
then values that display as the same may differ in their final few significant
figures. For example, the calculated values 1/3 and 200/600 may be assigned
to different groups depending on how the final figure rounds. A small
value such as 1e-12 could then be used to allocate these two distinct values
to the same group. The default value for this item is taken from the option
Tolerance on creating levels from variate in the
Spreadsheet Conversions Options Tab.
Text Options
When factors are generated by converting columns of text, appropriate
these options control how strings are grouped together.
If Ignore case is selected, then strings which are identical a part from
their case will be grouped together. For example, 'male', 'Male' and 'MALE' would
be set as one level if this was selected and three separate levels otherwise.
If Ignore blanks is selected, then strings which are identical a part from
leading, trailing or duplicate spaces will be grouped together. For example,
be set as one level if this was selected and four separate levels otherwise.
Note however 'FordFiesta' would be regarded as separate in either case,
as this is a single word rather than two words.
Read Text As Date
When converting a text to a variate you can use this option
to read the text as a date (e.g. 31/12/98). The format that the
date text is in needs to be specified via the Date button
which becomes visible when this option is selected. The base date
(day 1) is also set via the Date button.
Note
When a text is converted to a factor, the strings in the text will be truncated to 60 characters
(maximum factor label length).
See Also
Convert Sheet
Date Formats
Convert Multiple Columns
Spreadsheet Add Multiple Columns
Duplicate Column
Copy or Move a Column from another Sheet
Code a Column to Groups
Options - Date Format
Spreadsheet Column Menu
Spreadsheet types
Spreadsheet Limits
In the command language, a variate or factor can be converted to a text with the
PRINT directive:
PRINT [C=TXT;IPRINT=*;SQUASH=yes] VAR
A variate or text can be converted to a factor with the GROUPS directive:
GROUPS VAR; FACTOR=FACT
GROUPS [Modify=yes] VAR "if the same structure is to be changed"
A text can be converted to a variate with a READ directive:
READ [C=TXT] VAR