MulaiMulai sekarang secara gratis

Performing cluster sampling

Now that you know when to use cluster sampling, it's time to put it into action. In this exercise you'll explore the JobRole column of the attrition dataset. You can think of each job role as a subgroup of the whole population of employees.

attrition_pop is available; dplyr is loaded.

Latihan ini adalah bagian dari kursus

Sampling in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Get unique JobRole values
job_roles_pop <- ___

# Randomly sample four JobRole values
job_roles_samp <- ___

# See the result
job_roles_samp
Edit dan Jalankan Kode