Question
Generate RANDOM and UNIQUE numbers for a specific range
Hello,
I am trying to randomly sample x amount of rows from a CDT by generating x random numbers in the range 1:length(myCdt). The issue I am getting is that some of these random numbers are repeated.
Is there a way to generate random numbers in a given interval and have them be unique?
Here is what I have so far:
local!randomNumbers:if(
length(local!query)>15,
1+ tointeger(rand(15) * length(local!query)),
local!query,
),
