-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_code_1.Rmd
47 lines (34 loc) · 1.47 KB
/
test_code_1.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
---
title: "Testing functions"
author: "Sophie_Berube"
date: "9/15/2017"
output: pdf_document
---
Testing functions in rplos package.
library(rplos)
Facetplos: searching through the entire plos texts for words, and showing in how many articles theses words appear and in which kind of articles (journal and subject associated with the article). Useful for associating a statistical technique with a subject (ex. Bayes in genomics).
```{r, facetplos}
ANOVA<- facetplos(q='*:*',facet.field=c('journal'),facet.query='ANOVA')
str(ANOVA$facet_fields$journal)
Bayes<- facetplos(q=list('bayes','bayesian'),facet.field=c('journal','subject'),
facet.date.end='NOW')
test<- facetplos(q='alcohol', facet.field=c('journal','subject'))
test$facet_fields$subject
ANOVA$facet_fields$journal
?facetplos
Bayes
```
Highplos: list of journal articles that contains certain words, can filter by section, since we are interested in statistical methods, we can filter by the methods section.
```{r, highplos}
highplos(q='ANOVA',hl.fl=c('methods','materials and methods', 'methods and materials'))
```
Plosword: lists and plots how many articles use certain words.
```{r, plosword}
out<- plosword(list('ANOVA','bayesian','linear regression'),vis=TRUE)
out$table
out$plot
```
Plotting through time: shows a plot of the number of article using specific words as a function of time, useful for time trends.
```{r plot_throughtime}
plot_throughtime(terms=list('bayesian','bayes'),limit=300)
```