Index: To Permutation...

Generates a Permutation from the selected Index by randomly permuting blocks of equivalent elements.

Suppose your data consists of groups of equivalent elements and the number of elements in the groups are not equal. You want to make random ordering of your data such that the elements in a group stay together. The following example shows you how.

## Setting

Permute within classes
  determines whether the elements within a class will be randomly permuted.

## Example

Suppose your data, for example a Strings, consists of groups of equivalent elements and the number of elements in the groups are not equal. You want to make a random ordering of your data such that the elements in a group stay together. The following example shows you how.

We start from the following Strings:

`6 (number of strings)
` `"hallo"
` `"dag allemaal"
` `"hallo"
` `"tot morgen"
` `"hallo"
` `"tot morgen"
`

We choose To Index which will give us the following Index:

`1 (number of columns) "" (no column name)
` `"dag allemaal"
` `"hallo"
` `"tot morgen"
` `6 (number of elements)
` `2
` `1
` `2
` `3
` `2
` `3
`

We choose To Permutation and with Permute within classes off, this might generate the permutation (2,4,6,1,3,5).

Selecting the Permutation and the Strings together and choosing Permute strings will generate the following Strings:

`"dag allemaal"
` `"tot morgen"
` `"tot morgen"
` `"hallo"
` `"hallo"
` `"hallo"
`

We see that the permutation always keeps identical strings together.