Select menu: Spread | Column | Convert
Use this to convert either the entire spreadsheet or columns of a vector spreadsheet to other types.
- If you are working with a multi-page spreadsheet, select the sheet you want to change.
- From the menu select Spread | Column | Convert.
- If you are converting a column select the column name from the dropdown list before selecting the new Column type.
You can change each column in turn by selecting a name from the dropdown list then select the type and click Apply: this keeps the dialog open so you can select the next column.
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
- 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 dialog.
Converts a column of a vector spreadsheet to another type. The desired column should be selected from the dropdown list above the list of column types.
- Variate columns are generated using the values that are currently
displayed in the column. Any factor labels or text are converted to numbers
wherever 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 read-only 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 field.
Classify table with
When converting to a table, you can specify whether the new sheet has:
- 1 classifying factor – multiple one-way tables (one table per column)
- 2 classifying factors – a single two-way table with a factor indexing the columns.
Include table margins
When selected, if a table being converted to a vector or matrix sheet contains margins they will be included in the conversion, otherwise they will be removed.
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.
A positive value in this field 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 Tools | Spreadsheet Options | Conversions tab.
When factors are generated by converting columns of text, these options control how strings are grouped together. If Ignore case is selected, then strings which are identical apart 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 apart from leading, trailing or duplicate spaces will be grouped together.
When a text is converted to a factor, the strings in the text will be truncated to 60 characters (maximum factor label length).
Read text as date values
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 format button which becomes enabled when this option is selected. The base date (day 1) is also set via the Date format button.
Convert multiple columns
Add multiple columns
Copy or move a column from another sheet
Code a column to groups
Options (dat format tab)
Spreadsheet column menu
In the command language, a variate or factor can be converted to a text with the PRINT directive:
PRINT [CHANNEL=TXT; IPRINT=*; SQUASH=yes] VAR
A variate or text can be converted to a factor with the GROUPS directive:
GROUPS VAR; FACTOR=FACT
GROUPS [REDEFINE=yes] VAR “if the same structure is to be changed”
A text can be converted to a variate with a READ directive:
READ [CHANNEL=TXT] VAR