# NOT RUN {
chains <- 0:23
## Presuming current processing chain is the 1st chain (C index = 0)
## pick 2 chains out of 24 chains, excluding current chain.
PickChains(0, 2, chains)
## Example outputs
## [,1]
## [1,] 17
## [2,] 12
## [,1]
## [1,] 2
## [2,] 5
## [,1]
## [1,] 5
## [2,] 3
## [,1]
## [1,] 10
## [2,] 8
## [,1]
## [1,] 15
## [2,] 8
## get a random number of subchains
GetSubchains(24)
## [,1]
## [1,] 0
## [2,] 3
## [3,] 5
## [4,] 9
## [5,] 10
## [6,] 12
## [7,] 14
## [8,] 15
## [9,] 18
## [10,] 20
## [11,] 21
## [12,] 22
# }
Run the code above in your browser using DataLab