Substitution transformations REPLACE RESCALE SEQ SET SUB SPLIT


!REPLACE old new replaces data values old with new values new in the current variable.

IF(DataValue.EQ.Old) DataValue=New
 Rate !REPLACE -9 0


!RESCALE o s rescales the column(s) in the current (!G group of) variable, or !G group of variables, by adding o and scaling the result by s
 Rate !RESCALE -10 0.1


!SEQ replaces the data value with a sequential number starting at 1 which increments whenever the data value changes between successive records; the current field is presumed to define a factor and the number of levels in the new factor is set to the number of levels identified in this sequential process. Missing values remain missing.
 plot !=V3 !SEQ


!SET vlist for a list of n values, vlist, replaces the data values 1:n by the corresponding element from vlist; data values less than 1 or greater than n are replaced by zero.

vlist may run over several lines provided each incomplete line ends with a comma, i.e., a comma is used as a continuation symbol.
 treat !L C A B
 CvR !=treat !SET 1 -1 -1
 group !=treat !SET 1,
    2 2 3 3 4


!SUB vlist replaces data values which appear in the list vlist with their position number. Data values not found in vlist are set to 0.0.

vlist may run over several lines provided each incomplete line ends with a comma. ASReml allows for a small rounding error when matching. It may not distinguish properly if values in vlist only differ in the sixth decimal place.
  year 3 !SUB 1966 1967 1968


!SPLIT g creates a new (set of) variables by splitting the data value in an existing (set of) variables g. A number greater than 99 represented as abcd is changed to ab and the new variable is cd. A number less than 100 represented as bd is changed to b and the new variable is d.

!SPLIT provides for the situation when marker data is given in a compressed form: that is a value of 12 actually means the allelic pair 1 and 2. The transformation is simple minded. If the data value is less than 100, it is split into two single digit numbers. Otherwise the last two digits are split off (so that 123 becomes 1 and 23). The prototye example is
 Lallele !G 10 6
 Rallele !G 10 6 !SPLIT Lallele
assuming the data values corresponding to Lallele are drawn from the set (11:16, 21:26, 31:36, 41:46, 51:56, 61:66). The transformation replaces the data value with the value of the first digit, and puts the second digit value into Rallele.

Return to start