1. 学习
  2. /
  3. 课程
  4. /
  5. Sampling in R

Connected

练习

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.

说明 1 / 共 2 个

undefined XP
    1
    2
  • Get the loudness column of spotify_population, assigning to loudness_pop.
  • Using base-R, sample loudness_pop to get 100 random values, assigning to loudness_samp.