我有一个作者的数据,他们发表的论文和每篇论文的引文数(以及其他71篇专栏)。我想找出被引用最多的作家。问题是有些论文有多个作者,所以每个作者都是一个子字符串。我可以很容易地把作者分开,但我不知道如何汇总他们的每一篇引文。有人能帮忙吗?
这是数据
year citation author paper_title
2018 33 author1; author2 paper1
2018 89 author2; author3 paper2
2017 10 author4 paper3
2013 10 author2 paper4
2014 9 author3 paper5
2011 1 author5 paper7发布于 2019-09-10 18:18:47
df <- data.frame(year = c(2018, 2017),
citation = c(33,89),
author = c('author1; author2', 'author2; author3'),
paper_title = c('paper1', 'paper2'), stringsAsFactors = F)
df <- df %>% mutate(author=strsplit(author, "; ")) %>%
unnest(author) %>% group_by(author) %>% summarise(n_cit = sum(citation))https://stackoverflow.com/questions/57875991
复制相似问题