dplyr 1.0.0版:计数功能未返回正确的观察数

问题描述

有人可以向我解释dplyr :: count函数如何工作

我有这个数据

rankings <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-04-14/rankings.csv')

当我使用

rankings %>% dplyr::count(title) %>% mutate(Count = sum(n))

我明白了

   title                       n Count
   <chr>                   <dbl> <dbl>
 1 Juicy                      18   535
 2 Nuthin’ But A ‘G’ Thang    14   535
 3 The Message                14   535
 4 Shook Ones (Part II)       13   535
 5 fight The Power            11   535
 6 C.R.E.A.M.                 10   535
 7 93 ’Til Infinity            7   535
 8 N.Y. State Of Mind          7   535
 9 Dear Mama                   6   535
10 Jesus Walks                 6   535

每个标题只有一个obs(N = 311)的人...

预先感谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)