From 80618cc3b76c881e8f033725cf2cc9f47b87e992 Mon Sep 17 00:00:00 2001 From: Malika Ihle Date: Tue, 3 Sep 2024 15:36:48 +0200 Subject: [PATCH] Update random-numbers-generators.qmd --- tutorial_pages/random-numbers-generators.qmd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tutorial_pages/random-numbers-generators.qmd b/tutorial_pages/random-numbers-generators.qmd index 753023f..4ad1ef2 100644 --- a/tutorial_pages/random-numbers-generators.qmd +++ b/tutorial_pages/random-numbers-generators.qmd @@ -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.