NxShuffle - Shuffle the order of elements in a data set

Returns a randomly shuffled order of elements in the input data set.


NxShuffle(X, Seed, KeepNA)

is the input data sample (one/two-dimensional array of cells (e.g., rows or columns)).
is the seed value (positive integer) of the random number generator. If missing or zero(0), a random number from the CPU clock is used.
is a flag for leaving (or purging) observations with missing values (e.g., #N/A, #VALUE!, #NUM!, empty cell) found in the input data set. If missing, keepNA=False.


  1. The input data set may span multiple rows and/or columns, but the result is always a one-dimensional array (i.e. column).
  2. If the keepNA argument is set to False(0), observations with missing values (e.g. #N/A, #VALUE!, #NUM!, empty cell) in the input data set are purged prior to the shuffling.
  3. The returned array has the same size as the input data set minus the number of observations with missing values (e.g. #N/A, #VALUE!, etc.).
  4. For a seed value of zero(0), the NxShuffle will generate a random number from the machine clock, thus, returning different ordered elements set for each run.
  5. For negative seed value, NxShuffle returns #VALUE!.
  6. The NxShuffle function is available starting with version 1.66 PARSON.

Files Examples

Related Links



Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful