Statistics[Shuffle] - apply random permutation to a data sample
|
Calling Sequence
|
|
Shuffle(X, options)
|
|
Parameters
|
|
X
|
-
|
data sample
|
options
|
-
|
(optional) equation of the form inplace = truefalse; indicates whether to change the argument
|
|
|
|
|
Description
|
|
•
|
The Shuffle command applies a random permutation to X.
|
•
|
The first parameter X is a data sample which must be given as a one-dimensional Array, a Vector, or a list.
|
|
The option can be abbreviated to .
|
|
|
Notes
|
|
•
|
The Shuffle command accepts non-numeric data.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
So far, itself has not changed. The inplace option changes this.
>
|
|
| (9) |
>
|
|
| (10) |
Note that the output of Maple's random number generator is reproducible after a restart. If this is undesirable, one can use the randomize command.
>
|
|
>
|
|
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
>
|
|
>
|
|
| (13) |
>
|
|
| (14) |
>
|
|
| (15) |
|
|
Download Help Document
Was this information helpful?