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:
A3:
A5:
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProcSPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL