I am trying to convert the following for-loop into a function where I can vary sample size.
This code pulls 500 random samples between 1-365 and assesses if the value