-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R function sample() #45
Comments
What does the parameter replace do? |
Let's first create a random function that will return an integer between two provided values (both inclusive). So, if you call random() with no parameters, it will behave just like Math.random(), but if you call with random(0, 12), then it will have an equally likely chance of returning 0, 1, 2,..., 12. |
Have created a random(a, b) function and committed with the range() and median() functions. However I have not made tests for the random() function as I am not sure how to test that.
I have tested this in the console and it seems to work well. both a and b are inclusive and can be included as a random number. |
Replace = TRUE means once you've drawn a random number from the sample, On Sun, Jun 16, 2013 at 8:18 PM, Larry Maccherone
|
Returns a random sample from a population.
Called with three arguments: sample(dataSource, size=16, replace=TRUE)
Can be nested as in:
mean(sample(Population$V1, size=15, replace=TRUE)
The text was updated successfully, but these errors were encountered: