Simple sampling with base-R
While dplyr provides great tools for sampling data frames, if you want to work with vectors you can use base-R.
Let's turn it up to eleven and look at the loudness property of each song.
spotify_population is available.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Sampling in R
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Get the loudness column of spotify_population
loudness_pop <- ___
# Sample 100 values of loudness_pop
loudness_samp <- ___
# See the results
loudness_samp