FTEXT procedure
Forms a text structure from any GenStat data structure (A. Keen & J.T.N.M. Thissen).
Option
Parameters
Description
Procedure FTEXT can be used to form a text structure from almost any GenStat data structure. The structure from which the text structure is to be formed must be specified using the STRUCTURE parameter, and can be a scalar, factor, variate, text, table, matrix, symmetricmatrix, diagonalmatrix or pointer. The identifier of the text structure must be specified using the TEXT parameter. For numerical structures, the number of decimal places to use when forming the text can be set by means of the DECIMALS parameter. By default the number required to provide four significant figures is used, but unnecessary trailing zeros are ignored. For example, a scalar containing the number 3.250 will be printed with two decimal places, not three. If the STRUCTURE parameter is set to a factor, parameter FREPRESENTATION can be used to control the way in which factor values are represented in the text structure. The default is to use labels if available and levels otherwise. If FREPRESENTATION is set to ordinals, the DECIMALS parameter is always set to zero for the corresponding factor.
The MISSING option allows you to specify a string to be used instead of the default asterisk symbol to represent missing values. For example, you could set MISSING='unknown' or MISSING=' '.
Option: MISSING.
Parameters: STRUCTURE, TEXT, DECIMALS, FREPRESENTATION.
Method
The text is formed using the PRINT directive with option CHANNEL=TEXT. The calculation of a default number of decimals places uses the same method as in the DECIMALS procedure.
Action with
RESTRICT
If the STRUCTURE parameter has been restricted (as is possible only for a variate, factor or text) the length of the text structure will be the length of the restricted structure. The number of decimal places is determined from the values not excluded by the restriction.