-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
99 lines (70 loc) · 2.13 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
knitr::knit_hooks$set(crop = knitr::hook_pdfcrop)
library(ggplot2)
library(tidyr)
```
# paper
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->
The goal of paper is to produce summary of publication profile of a scientist or a paper.
## Installation
You can install the released version of paper from [CRAN](https://CRAN.R-project.org) with:
```{r}
# install.packages("paper")
# not yet
```
And the development version from [GitHub](https://github.com/) with:
```{r}
# install.packages("devtools")
# devtools::install_github("kklot/paper")
library(paper)
```
## Example
This is a basic example which shows you how to solve a common problem:
### Search an author
```{r}
ath <- search_author("Van Kinh Nguyen", limit = 10)
get_paper(ath, ath$essential$authorId[1])
```
### Search a paper
- [ ] TODO - easy
### an_author
Get an author's papers
```{r}
ex_aut <- an_author(level = 'me_only')
summary(ex_aut)
ex_aut
```
Plot profile of an author
```{r, fig.width=3, fig.height=3, fig.cap="My publication profile contribution"}
plot(ex_aut)
```
Author's paper and papers cited each of those papers.
Rate limit does not allow sending more than 500 requests/minutes.
- [ ] ask for more once the package is more mature
```{r}
# ex_aut2 <- an_author(level = "me_and_cited_me")
# ex_aut2
```
### a_paper
Get all citations to a paper, number of citations to each of those paper, year, and field of study.
These are related papers.
```{r example}
ex_paper <- a_paper()
ex_paper
```
Example citation profile of a single paper. The extra margin is cropped with `pdfcrop`, see [document](https://bookdown.org/yihui/rmarkdown-cookbook/crop-plot.html) here.
```{r, crop = TRUE, width = 3, height = 3, fig.cap='Profile of all papers that cited this work'}
plot(ex_paper)
```