探索一个嵌套单元格
在第一个练习中,您已成功创建了嵌套数据框 gap_nested。data 列为每个国家保存了一个 tibble。在本练习中,您将探索其中一个嵌套的数据块。
本练习是课程的一部分
Tidyverse 中的机器学习
练习说明
- 提取阿尔及利亚的嵌套数据,并将其保存为
algeria_df。 - 计算阿尔及利亚人口的以下汇总统计量:
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(___)