Resampling

Learn how to mimic different activities of virtual resampling.

Let’s now mimic our tactile resampling activity virtually with a computer.

Virtually resampling once

First, let’s perform the virtual analog of resampling once. Recall that the pennies_sample data frame included in the moderndive package contains the years of our original sample of 50 pennies from the bank. Furthermore, recall that we used the rep_sample_n() function as a virtual shovel to sample balls from our virtual bowl of 2,400 balls, as follows:

Get hands-on with 1400+ tech skills courses.