You can easily convert columns from one data type to another. For example, if you have imported a numeric column as text, you can convert it to a factor or variate.
- First select one or more columns to convert.
- To select several non-adjacent columns hold down Ctrl and click each column header.
- To select several adjacent columns hold down Shift then click the first and last column header in your selection.
- EITHER
- To convert columns to factors without sorting them by level select Spread | Factor | Convert. No further action is required.
OR - To convert columns to variates or texts, or to convert to a factor and sort the levels as well, select Spread | Column | Convert.
The dialog that appears will depend on whether you have a single column or multiple columns selected.
- To convert columns to factors without sorting them by level select Spread | Factor | Convert. No further action is required.
- Set options as required then click OK.
This dialog opens when a single column is selected | This dialog opens when multiple columns are selected |
Column type | Specifies the new type for the selected columns.
|
Text options | These options control how strings are 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).
|
Sort levels (factors only) |
Sorts the factors within each of the selected columns by their levels. |
Tolerance on creating factor levels |
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, they 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. |
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). When you select this option the Date format button becomes enabled so that you can specify the date format. The base date (day 1) is also set via the Date format button. |