Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit f20102e

Browse files
committed
update vignettes and readme
1 parent 403fdde commit f20102e

File tree

12 files changed

+413
-359
lines changed

12 files changed

+413
-359
lines changed

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ searchplos('ecology', 'id,publication_date', limit = 5)
7070
#> # A tibble: 1 x 2
7171
#> numFound start
7272
#> <int> <int>
73-
#> 1 43116 0
73+
#> 1 43873 0
7474
#>
7575
#> $data
7676
#> # A tibble: 5 x 2
@@ -93,7 +93,7 @@ searchplos(q="*:*", fl='id', fq=list('journal_key:PLoSONE',
9393
#> # A tibble: 1 x 2
9494
#> numFound start
9595
#> <int> <int>
96-
#> 1 199994 0
96+
#> 1 202918 0
9797
#>
9898
#> $data
9999
#> # A tibble: 5 x 1
@@ -173,15 +173,15 @@ searchplos(q='everything:"sports alcohol"~15', fl='title', fq='doc_type:full', l
173173
#> # A tibble: 1 x 2
174174
#> numFound start
175175
#> <int> <int>
176-
#> 1 125 0
176+
#> 1 126 0
177177
#>
178178
#> $data
179179
#> # A tibble: 3 x 1
180-
#> title
181-
#> <chr>
182-
#> 1 Alcohol Advertising in Sport and Non-Sport TV in Australia, during Chil
183-
#> 2 Alcohol intoxication at Swedish football matches: A study using biologi
184-
#> 3 Symptoms of Insomnia and Sleep Duration and Their Association with Inci
180+
#> title
181+
#> <chr>
182+
#> 1 Alcohol Advertising in Sport and Non-Sport TV in Australia, during Child
183+
#> 2 Alcohol intoxication at Swedish football matches: A study using biologic
184+
#> 3 Symptoms of Insomnia and Sleep Duration and Their Association with Incid
185185
```
186186

187187
Narrow results to 7 words apart, changing the ~15 to ~7
@@ -193,15 +193,15 @@ searchplos(q='everything:"sports alcohol"~7', fl='title', fq='doc_type:full', li
193193
#> # A tibble: 1 x 2
194194
#> numFound start
195195
#> <int> <int>
196-
#> 1 70 0
196+
#> 1 71 0
197197
#>
198198
#> $data
199199
#> # A tibble: 3 x 1
200-
#> title
201-
#> <chr>
202-
#> 1 Alcohol Advertising in Sport and Non-Sport TV in Australia, during Chil
203-
#> 2 Alcohol intoxication at Swedish football matches: A study using biologi
204-
#> 3 Symptoms of Insomnia and Sleep Duration and Their Association with Inci
200+
#> title
201+
#> <chr>
202+
#> 1 Alcohol Advertising in Sport and Non-Sport TV in Australia, during Child
203+
#> 2 Alcohol intoxication at Swedish football matches: A study using biologic
204+
#> 3 Symptoms of Insomnia and Sleep Duration and Their Association with Incid
205205
```
206206

207207
Remove DOIs for annotations (i.e., corrections) and Viewpoints articles
@@ -214,7 +214,7 @@ searchplos(q='*:*', fl=c('id','article_type'),
214214
#> # A tibble: 1 x 2
215215
#> numFound start
216216
#> <int> <int>
217-
#> 1 1951780 0
217+
#> 1 1981731 0
218218
#>
219219
#> $data
220220
#> # A tibble: 5 x 2
@@ -242,21 +242,21 @@ facetplos(q='alcohol', facet.field=c('journal','subject'), facet.limit=5)
242242
#> # A tibble: 5 x 2
243243
#> term value
244244
#> <chr> <chr>
245-
#> 1 plos one 24612
246-
#> 2 plos genetics 563
247-
#> 3 plos medicine 484
248-
#> 4 plos neglected tropical diseases 446
249-
#> 5 plos pathogens 334
245+
#> 1 plos one 25036
246+
#> 2 plos genetics 568
247+
#> 3 plos medicine 494
248+
#> 4 plos neglected tropical diseases 452
249+
#> 5 plos pathogens 336
250250
#>
251251
#> $facet_fields$subject
252252
#> # A tibble: 5 x 2
253253
#> term value
254254
#> <chr> <chr>
255-
#> 1 biology and life sciences 26399
256-
#> 2 medicine and health sciences 23550
257-
#> 3 research and analysis methods 15125
258-
#> 4 biochemistry 12900
259-
#> 5 physical sciences 9913
255+
#> 1 biology and life sciences 26830
256+
#> 2 medicine and health sciences 23943
257+
#> 3 research and analysis methods 15350
258+
#> 4 biochemistry 13072
259+
#> 5 physical sciences 10085
260260
#>
261261
#>
262262
#> $facet_pivot
@@ -385,7 +385,7 @@ plossubject(q='marine ecology', fl = c('id','journal'), limit = 10)
385385
#> # A tibble: 1 x 2
386386
#> numFound start
387387
#> <int> <int>
388-
#> 1 3811 0
388+
#> 1 3872 0
389389
#>
390390
#> $data
391391
#> # A tibble: 10 x 2
@@ -429,11 +429,11 @@ Visualize word use across articles
429429
plosword(list('monkey','Helianthus','sunflower','protein','whale'), vis = 'TRUE')
430430
#> $table
431431
#> No_Articles Term
432-
#> 1 12367 monkey
433-
#> 2 529 Helianthus
434-
#> 3 1484 sunflower
435-
#> 4 140626 protein
436-
#> 5 1716 whale
432+
#> 1 12514 monkey
433+
#> 2 541 Helianthus
434+
#> 3 1513 sunflower
435+
#> 4 142150 protein
436+
#> 5 1745 whale
437437
#>
438438
#> $plot
439439
```

inst/vign/facethighlight.md

Lines changed: 48 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,22 @@ facetplos(q='*:*', facet.field='journal')
4343
#>
4444
#> $facet_fields
4545
#> $facet_fields$journal
46-
#> X1 X2
47-
#> 1 plos one 1407216
48-
#> 2 plos genetics 54150
49-
#> 3 plos pathogens 47708
50-
#> 4 plos computational biology 41170
51-
#> 5 plos neglected tropical diseases 41072
52-
#> 6 plos biology 30012
53-
#> 7 plos medicine 21466
54-
#> 8 plos clinical trials 496
55-
#> 9 plos medicin 9
56-
#>
46+
#> # A tibble: 9 x 2
47+
#> term value
48+
#> <chr> <chr>
49+
#> 1 plos one 1687125
50+
#> 2 plos genetics 63261
51+
#> 3 plos pathogens 56916
52+
#> 4 plos neglected tropical diseases 52484
53+
#> 5 plos computational biology 49163
54+
#> 6 plos biology 34626
55+
#> 7 plos medicine 25102
56+
#> 8 plos clinical trials 521
57+
#> 9 plos medicin 9
58+
#>
59+
#>
60+
#> $facet_pivot
61+
#> NULL
5762
#>
5863
#> $facet_dates
5964
#> NULL
@@ -71,22 +76,29 @@ facetplos(q='*:*', facet.field='journal', facet.query='cell,bird')
7176

7277
```
7378
#> $facet_queries
74-
#> term value
75-
#> 1 cell,bird 24
79+
#> # A tibble: 1 x 2
80+
#> term value
81+
#> <chr> <int>
82+
#> 1 cell,bird 6
7683
#>
7784
#> $facet_fields
7885
#> $facet_fields$journal
79-
#> X1 X2
80-
#> 1 plos one 1407216
81-
#> 2 plos genetics 54150
82-
#> 3 plos pathogens 47708
83-
#> 4 plos computational biology 41170
84-
#> 5 plos neglected tropical diseases 41072
85-
#> 6 plos biology 30012
86-
#> 7 plos medicine 21466
87-
#> 8 plos clinical trials 496
88-
#> 9 plos medicin 9
89-
#>
86+
#> # A tibble: 9 x 2
87+
#> term value
88+
#> <chr> <chr>
89+
#> 1 plos one 1687125
90+
#> 2 plos genetics 63261
91+
#> 3 plos pathogens 56916
92+
#> 4 plos neglected tropical diseases 52484
93+
#> 5 plos computational biology 49163
94+
#> 6 plos biology 34626
95+
#> 7 plos medicine 25102
96+
#> 8 plos clinical trials 521
97+
#> 9 plos medicin 9
98+
#>
99+
#>
100+
#> $facet_pivot
101+
#> NULL
90102
#>
91103
#> $facet_dates
92104
#> NULL
@@ -105,24 +117,6 @@ facetplos(q='*:*', url=url, facet.date='publication_date',
105117
```
106118

107119
```
108-
#> $facet_queries
109-
#> NULL
110-
#>
111-
#> $facet_fields
112-
#> NULL
113-
#>
114-
#> $facet_dates
115-
#> $facet_dates$publication_date
116-
#> date value
117-
#> 1 2017-02-23T00:00:00Z 2749
118-
#> 2 2017-02-24T00:00:00Z 1878
119-
#> 3 2017-02-25T00:00:00Z 0
120-
#> 4 2017-02-26T00:00:00Z 689
121-
#> 5 2017-02-27T00:00:00Z 689
122-
#> 6 2017-02-28T00:00:00Z 0
123-
#>
124-
#>
125-
#> $facet_ranges
126120
#> NULL
127121
```
128122

@@ -137,14 +131,14 @@ highplos(q='alcohol', hl.fl = 'abstract', rows=2)
137131
```
138132

139133
```
140-
#> $`10.1371/journal.pmed.0040151`
141-
#> $`10.1371/journal.pmed.0040151`$abstract
142-
#> [1] "Background: <em>Alcohol</em> consumption causes an estimated 4% of the global disease burden, prompting"
134+
#> $`10.1371/journal.pone.0185457`
135+
#> $`10.1371/journal.pone.0185457`$abstract
136+
#> [1] "Objectives: <em>Alcohol</em>-related morbidity and mortality are significant public health issues"
143137
#>
144138
#>
145-
#> $`10.1371/journal.pone.0027752`
146-
#> $`10.1371/journal.pone.0027752`$abstract
147-
#> [1] "Background: The negative influences of <em>alcohol</em> on TB management with regard to delays in seeking"
139+
#> $`10.1371/journal.pone.0071284`
140+
#> $`10.1371/journal.pone.0071284`$abstract
141+
#> [1] "\n<em>Alcohol</em> dependence is a heterogeneous disorder where several signalling systems play important"
148142
```
149143

150144
Search for the term _alcohol_ in the abstracts of articles, and return
@@ -156,14 +150,14 @@ highplos(q='alcohol', hl.fl='abstract', hl.fragsize=20, rows=2)
156150
```
157151

158152
```
159-
#> $`10.1371/journal.pmed.0040151`
160-
#> $`10.1371/journal.pmed.0040151`$abstract
161-
#> [1] "Background: <em>Alcohol</em>"
153+
#> $`10.1371/journal.pone.0185457`
154+
#> $`10.1371/journal.pone.0185457`$abstract
155+
#> [1] "Objectives: <em>Alcohol</em>"
162156
#>
163157
#>
164-
#> $`10.1371/journal.pone.0027752`
165-
#> $`10.1371/journal.pone.0027752`$abstract
166-
#> [1] " of <em>alcohol</em> on TB management"
158+
#> $`10.1371/journal.pone.0071284`
159+
#> $`10.1371/journal.pone.0071284`$abstract
160+
#> [1] "\n<em>Alcohol</em> dependence"
167161
```
168162

169163
Search for the term _experiment_ across all sections of an article, return
1.19 KB
Loading
-3.15 KB
Loading

inst/vign/fulltext.md

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,26 @@ full_text_urls(dois)
7373
```
7474

7575
```
76-
#> [1] "http://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1000942&type=manuscript"
77-
#> [2] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0130089&type=manuscript"
78-
#> [3] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0165670&type=manuscript"
79-
#> [4] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1002909&type=manuscript"
80-
#> [5] "http://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1004317&type=manuscript"
81-
#> [6] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.1002259&type=manuscript"
82-
#> [7] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003554&type=manuscript"
83-
#> [8] "http://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1004432&type=manuscript"
84-
#> [9] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0162873&type=manuscript"
85-
#> [10] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0163015&type=manuscript"
86-
#> [11] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003597&type=manuscript"
87-
#> [12] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1004934&type=manuscript"
88-
#> [13] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1004795&type=manuscript"
89-
#> [14] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.0000004&type=manuscript"
90-
#> [15] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003631&type=manuscript"
91-
#> [16] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003549&type=manuscript"
92-
#> [17] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003507&type=manuscript"
93-
#> [18] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.0000040&type=manuscript"
94-
#> [19] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.0000026&type=manuscript"
95-
#> [20] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003332&type=manuscript"
76+
#> [1] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0044136&type=manuscript"
77+
#> [2] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0155491&type=manuscript"
78+
#> [3] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168631&type=manuscript"
79+
#> [4] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0058100&type=manuscript"
80+
#> [5] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168627&type=manuscript"
81+
#> [6] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0184491&type=manuscript"
82+
#> [7] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0155489&type=manuscript"
83+
#> [8] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0072057&type=manuscript"
84+
#> [9] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0127059&type=manuscript"
85+
#> [10] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168605&type=manuscript"
86+
#> [11] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0058079&type=manuscript"
87+
#> [12] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168602&type=manuscript"
88+
#> [13] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0044129&type=manuscript"
89+
#> [14] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0058091&type=manuscript"
90+
#> [15] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0184468&type=manuscript"
91+
#> [16] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0141298&type=manuscript"
92+
#> [17] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168604&type=manuscript"
93+
#> [18] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0155469&type=manuscript"
94+
#> [19] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0184467&type=manuscript"
95+
#> [20] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0085513&type=manuscript"
9696
```
9797

9898
### Get XML
@@ -148,8 +148,7 @@ if (requireNamespace("xml2")) {
148148
```
149149

150150
```
151-
#> [1] "Quantitative linkages between individual organism movements and the resulting population distributions are fundamental to understanding a wide range of ecological processes, including rates of reproduction, consumption, and mortality, as well as the spread of diseases and invasions. Typically, quantitative data are collected on either movement behaviors or population distributions, rarely both. This study combines empirical observations and model simulations to gain a mechanistic understanding and predictive ability of the linkages between both individual movement behaviors and population distributions of a single-celled planktonic herbivore. In the laboratory, microscopic 3D movements and macroscopic population distributions were simultaneously quantified in a 1L tank, using automated video- and image-analysis routines. The vertical velocity component of cell movements was extracted from the empirical data and used to motivate a series of correlated random walk models that predicted population distributions. Validation of the model predictions with empirical data was essential to distinguish amongst a number of theoretically plausible model formulations. All model predictions captured the essence of the population redistribution (mean upward drift) but only models assuming long correlation times (minute), captured the variance in population distribution. Models assuming correlation times of 8 minutes predicted the least deviation from the empirical observations. Autocorrelation analysis of the empirical data failed to identify a de-correlation time in the up to 30-second-long swimming trajectories. These minute-scale estimates are considerably greater than previous estimates of second-scale correlation times. Considerable cell-to-cell variation and behavioral heterogeneity were critical to these results. Strongly correlated random walkers were predicted to have significantly greater dispersal distances and more rapid encounters with remote targets (e.g. resource patches, predators) than weakly correlated random walkers. The tendency to disperse rapidly in the absence of aggregative stimuli has important ramifications for the ecology and biogeography of planktonic organisms that perform this kind of random walk."
152-
#> [2] "Organism movement is fundamental to how organisms interact with each other and the environment. Such movements are also important on the population level and determine the spread of disease and invasion, reproduction, consumption, and mortality. Theoretical ecologists have sought to predict population dispersal rates, which are often hard to measure, from individual movement behaviors, which are often easier to measure. This problem has been non-trivial. This manuscript contributes seldom available, simultaneously measured movement behaviors and population distributions of a single celled planktonic organism. The empirical data are used to distinguish amongst a set of plausible theoretical modeling approaches to suggest that organism movements are highly correlated, meaning movement direction and speed is consistent over several minutes. Previous estimates suggested persistence only lasted several seconds. Minute-scale correlations result in much more rapid organism dispersal and greater dispersal distance, indicating that organisms encounter and impact a greater portion of their surrounding habitat than previously suspected."
151+
#> [1] "Growth hormone (GH) is an important regulator of metabolism and body composition. GH deficiency is associated with increased visceral body fat and other features of the metabolic syndrome. Here we performed a cross-sectional study to explore the association of GH levels with nonalcoholic fatty liver disease (NAFLD), which is considered to be the hepatic manifestation of the metabolic syndrome. A total of 1,667 subjects were diagnosed as NAFLD according the diagnostic criteria, and 5,479 subjects were defined as the controls. The subjects with NAFLD had significantly lower levels of serum GH than the controls. Those with low GH levels had a higher prevalence of NAFLD and the metabolic syndrome. A stepwise logistic regression analysis showed that GH levels were significantly associated with the risk factor for NAFLD (OR = 0.651, 95%CI = 0.574–0.738, P<0.001). Our results showed a significant association between lower serum GH levels and NAFLD."
153152
```
154153

155154
Extract reference lists, just give back first one from each for brevity sake
@@ -165,15 +164,15 @@ if (requireNamespace("xml2")) {
165164
```
166165

167166
```
168-
#> $`10.1371/journal.pone.0130089`
167+
#> $`10.1371/journal.pone.0155491`
169168
#> {xml_node}
170-
#> <ref id="pone.0130089.ref001">
169+
#> <ref id="pone.0155491.ref001">
171170
#> [1] <label>1</label>
172-
#> [2] <mixed-citation xlink:type="simple" publication-type="book"><name na ...
171+
#> [2] <mixed-citation publication-type="journal" xlink:type="simple"><name ...
173172
#>
174-
#> $`10.1371/journal.pone.0165670`
173+
#> $`10.1371/journal.pone.0168631`
175174
#> {xml_node}
176-
#> <ref id="pone.0165670.ref001">
175+
#> <ref id="pone.0168631.ref001">
177176
#> [1] <label>1</label>
178-
#> [2] <mixed-citation publication-type="book" xlink:type="simple"><collab> ...
177+
#> [2] <mixed-citation publication-type="journal" xlink:type="simple"><name ...
179178
```

0 commit comments

Comments
 (0)