基于 golden ratio 探索用户
用户的粉丝数与关注数之比称为 golden ratio。
这个比值对市场人员制定推广策略很有参考价值。
在本练习中,您将为聚合数据框 counts_df 计算 golden ratio。该数据框是在上一个练习的最后一步创建的。
本练习已预加载数据框 counts_df 和库 dplyr。
本练习是课程的一部分
用 R 分析社交媒体数据
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Calculate and store the golden ratio
counts_df$ratio <- counts_df$___/counts_df$___
# Sort the data frame in decreasing order of follower count
counts_sort <- arrange(___, desc(___))
# View the first few rows
head(counts_sort)