I have a sample of 300 elements and I need a random vector of size 100000 which consists of random repetitions of the elements of the 300-element sample
I have tried the following
RandomSample[valueVector, 100000];
which returns the error
RandomSample::smplen: RandomSample cannot generate a sample of length 100000, which is greater than the length of the sample set {24741.5,20716.6,20850.3,20405.7,22293.1,46828.8,18963.4,25654.3,20767.4,22529.1,<<31>>,24440.8,22442.4,21309.6,25205.9,20810.9,20757.4,23551.3,22783.4,22674.8,<<250>>}. If you want a choice of possibly repeated elements from the set, use RandomChoice.
Can someone please suggest me how can I do this? should I use the RandomSample 333 times or is there a better way to do this?
RandomChoice". Reading the documentation and all error codes surely takes less effort than posting a question. – rhermans Nov 29 '22 at 15:02