探索巢狀儲存的儲存格
在第一個練習中,你已成功建立巢狀資料框 gap_nested。data 欄位為每個國家儲存一個 tibble。這個練習中,你將探索其中一個巢狀區塊。
本練習屬於課程
Tidyverse 的 Machine Learning
練習說明
- 取出 Algeria 的巢狀資料,並將其存成
algeria_df。 - 計算 Algeria 人口的下列摘要統計:
min()、max()與mean()。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Extract the data of Algeria
algeria_df <- ___$data[[___]]
# Calculate the minimum of the population vector
min(___)
# Calculate the maximum of the population vector
max(___)
# Calculate the mean of the population vector
mean(___)