shuffle
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
Create a shuffled version of a set.
- Usage
shuffle(x {, n {, once { seed}}})
- x
- the set to be shuffled; must be a vector or matrix
- n
- the number of row exchanges applied top x;
0 < n
(default=nrow(x)/2)
- once
- change row position only once
- once=0: the number of exchanges of a row is not limited
- once≠0: the number of exchanges of a row is limited to 1
- seed
- if this value is not equal 0, it is used to initialize the random number generator which generates the indices of the rows to be exchanged