首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用json格式每年收集引用类型的卷?

如何使用json格式每年收集引用类型的卷?
EN

Stack Overflow用户
提问于 2019-08-05 06:13:52
回答 1查看 35关注 0票数 2

使用参考书目的格式如下所示:

代码语言:javascript
复制
@article{alvarez2015skillrank,
  title={Skillrank: Towards a hybrid method to assess quality and confidence of professional skills in social networks},
  author={{\'A}lvarez-Rodr{\'\i}guez, Jose Mar{\'\i}a and Colomo-Palacios, Ricardo and Stantchev, Vladimir},
  journal={Scientific Programming},
  volume={2015},
  pages={3},
  year={2015},
  publisher={Hindawi Publishing Corp.}
}

@inproceedings{arora2017supporting,
  title={Supporting collaborative software development in academic learning environment: A collaborative pair and quadruple programming based approach},
  author={Arora, Ritu and Goel, Sanjay and Mittal, RK},
  booktitle={2017 Tenth International Conference on Contemporary Computing (IC3)},
  pages={1--7},
  year={2017},
  organization={IEEE}
}

@inproceedings{bachrach2015human,
  title={Human judgments in hiring decisions based on online social network profiles},
  author={Bachrach, Yoram},
  booktitle={2015 IEEE International Conference on Data Science and Advanced Analytics (DSAA)},
  pages={1--10},
  year={2015},
  organization={IEEE}
}

如何能够产生一个数据帧,其中包含每年的文章和每年的会议数量。

输出示例

代码语言:javascript
复制
year, article, conference
2015,1,1,
2016,0,0
2017,0,1
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-08-05 06:41:44

使用RefManageR包将文件nathalie.bib读入R,然后将其转换为数据帧,并执行计数,指定分组依据的变量。

代码语言:javascript
复制
library(dplyr)
library(RefManageR)

"nathalie.bib" %>%
  ReadBib %>%
  as.data.frame %>%
  count(bibtype, year)

给予:

代码语言:javascript
复制
# A tibble: 3 x 3
  bibtype       year      n
  <chr>         <chr> <int>
1 Article       2015      1
2 InProceedings 2015      1
3 InProceedings 2017      1

表格格式

如果d是上面显示的计数的数据框,那么它就是一个2d表格:

代码语言:javascript
复制
d %>%
  xtabs(n ~ year + bibtype, .) %>% 
  addmargins(FUN = list(total = sum), quiet = TRUE)

给予:

代码语言:javascript
复制
       bibtype
year    Article InProceedings total
  2015        1             1     2
  2017        0             1     1
  total       1             2     3
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57350555

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档