4.9 Shuffle the data

 

We have data as follows:

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20

SPL script:

A
1 =file(“Book1.xlsx”).xlsimport@w()
2 =A1.conj().sort(rand()).group(#%5)
3 =A1.(~.sort(rand()))
4 =transpose(A1).(~.sort(rand()))
5 =transpose(A9)

A2 Shuffle the whole data table randomly.
A3 Shuffle data in each row.
A4 Transpose data and then shuffle data in each row.
A5 Transpose data back so that data in each column is shuffled.

Execution result:

A2:

imagepng

A3:

imagepng

A5:

imagepng