Simple sampling with dplyr
Throughout this chapter you'll be exploring song data from Spotify. Each row of the dataset represents a song, and there are 41656 rows. Columns include the name of the song, the artists who performed it, the release year, and attributes of the song like its duration, tempo, and danceability. We'll start by looking at the durations.
Your first task is to sample the song dataset and compare a calculation on the whole population and on a sample.
spotify_population is available and dplyr is loaded.
Este ejercicio forma parte del curso
Sampling in R
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# View the whole population dataset
___
# Sample 1000 rows from spotify_population
spotify_sample <- ___
# See the result
spotify_sample