MulaiMulai sekarang secara gratis

Summarizing the full dataset

In this analysis, you're going to focus on "% of votes that are yes" as a metric for the "agreeableness" of countries.

You'll start by finding this summary for the entire dataset: the fraction of all votes in their history that were "yes". Note that within your call to summarize(), you can use n() to find the total number of votes and mean(vote == 1) to find the fraction of "yes" votes.

Latihan ini adalah bagian dari kursus

Case Study: Exploratory Data Analysis in R

Lihat Kursus

Petunjuk latihan

  • Print the votes_processed dataset that you created in the previous exercise.
  • Summarize the dataset using the summarize() function to create two columns:
    • total: with the number of votes
    • percent_yes: the percentage of "yes" votes

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Print votes_processed


# Find total and fraction of "yes" votes
Edit dan Jalankan Kode