Is there a faster method for taking a random sub sample (without replacement), than the base::sample function?
Is there a faster method for taking a random sub sample (without replacement), than
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you can get a little bit of a speed-up by eliminating the base::sample function call:
Depending on your problem there may be other more clever ways of speeding up your code. Think about ways to replace many small calls to sample with one big one.