Skip to content

Commit

Permalink
Update random-numbers-generators.qmd
Browse files Browse the repository at this point in the history
  • Loading branch information
MalikaIhle committed Sep 3, 2024
1 parent f259088 commit 80618cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tutorial_pages/random-numbers-generators.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
R contains several functions to generate random numbers.
Type *`?function`* in your consol to get information on the function's arguments (i.e. the values that must be provided to obtain the function's result).

The function
* `sample(x, n, replace=FALSE)` draws `n` values from a given vector `x` without replacement (by default) .
The function

* `sample(x, n, replace=FALSE)` draws `n` values from a given vector `x` without replacement (by default) .

Sampling without replacement means that when you repeatedly draw e.g. 1 item from a pool of items, any item selected during the first draw is not available for selection during the second draw, and the first and second selected items are not in the pool to select from during the third draw, etc. Sampling with replacement means that all the original options are available at each draw.

Expand Down

0 comments on commit 80618cc

Please sign in to comment.