VTABLE procedure
Forms a variate and set of classifying factors from a table (P.W. Goedhart).
No options
Parameters
Description
This procedure can be used to store the body of a table in a variate and obtain a set of factors to represent the way in which the data are arranged in the table. These factors then classify the newly formed variate in the same way as in the table. You can also form a text containing labels formed from the values of the classifying factors. Margins of the table are ignored.
The table to be copied is specified by the TABLE parameter, the variate must be specified by the VARIATE parameter, the set of classifying factors can be obtained by setting CLASSIFICATION to a pointer, and the labels by setting the LABELS parameter to a text. If the CLASSIFICATION pointer has not been declared, the names of the classifying factors of the table are used as suffix names. The newly formed factors have the same attributes as the old classifying factors, excluding the setting of EXTRA. Note that the order in which the factors are obtained can be unexpected for implicitly declared tables as explained in the Guide to GenStat, Part 1, Section 4.1.5.
Options: none. Parameters: TABLE, VARIATE, CLASSIFICATION, LABELS.
Method
Margins of the table are deleted by the directive MARGIN. The classifying factors of the table are obtained with GETATTRIBUTE. The initial declarations of the new factors are done by DUPLICATE to transfer any relevant attributes. Factor values are then produced by GENERATE.