base-R でのシンプルサンプリング
dplyr はデータフレームのサンプリングに便利なツールを提供しますが、ベクトルを扱う場合は base-R を使えます。
音量(loudness)の特性に注目して、各曲の値を見ていきましょう。
spotify_population が用意されています。
この演習はコースの一部です
Rで学ぶサンプリング
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Get the loudness column of spotify_population
loudness_pop <- ___
# Sample 100 values of loudness_pop
loudness_samp <- ___
# See the results
loudness_samp