Text to Numbers


Menu location: Data_Cleaning and Encoding_Text to Numbers.


This function codes text as numbers to enable analysis. An example of where you might want to do this is a workbook that has been created from a database where certain categories are entered as text:


Category Data
TA 2.3
TA 3.4
TB 5.6
TB 4.5
TB 4.9
TA 3.9
TB 3.9


If you enter these data into two columns in a StatsDirect workbook, you can convert the Category column to numbers using the Text to Numbers function from the Data menu. If you select the whole of this column by clicking on the header, the first row will have the word "Category" in it. To avoid counting "Category" as one of your categories when it is really the column title, click on "No" when you are asked if the top row is to be included in the conversion. The results will be as follows:


Category Data
1 2.3
1 3.4
2 5.6
2 4.5
2 4.9
1 3.9
2 3.9


StatsDirect can code text automatically as in the example above. You may also specify your own numeric code for each different text string by entering any valid number alongside the matching text in a substitution table. The substitution table only appears if you click "Yes" when StatsDirect prompts you to specify numbers.



Copyright © 2000-2016 StatsDirect Limited, all rights reserved. Download a free trial here.