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

Commit

Permalink
update vignettes and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jul 18, 2018
1 parent 403fdde commit f20102e
Show file tree
Hide file tree
Showing 12 changed files with 413 additions and 359 deletions.
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ searchplos('ecology', 'id,publication_date', limit = 5)
#> # A tibble: 1 x 2
#> numFound start
#> <int> <int>
#> 1 43116 0
#> 1 43873 0
#>
#> $data
#> # A tibble: 5 x 2
Expand All @@ -93,7 +93,7 @@ searchplos(q="*:*", fl='id', fq=list('journal_key:PLoSONE',
#> # A tibble: 1 x 2
#> numFound start
#> <int> <int>
#> 1 199994 0
#> 1 202918 0
#>
#> $data
#> # A tibble: 5 x 1
Expand Down Expand Up @@ -173,15 +173,15 @@ searchplos(q='everything:"sports alcohol"~15', fl='title', fq='doc_type:full', l
#> # A tibble: 1 x 2
#> numFound start
#> <int> <int>
#> 1 125 0
#> 1 126 0
#>
#> $data
#> # A tibble: 3 x 1
#> title
#> <chr>
#> 1 Alcohol Advertising in Sport and Non-Sport TV in Australia, during Chil
#> 2 Alcohol intoxication at Swedish football matches: A study using biologi
#> 3 Symptoms of Insomnia and Sleep Duration and Their Association with Inci
#> title
#> <chr>
#> 1 Alcohol Advertising in Sport and Non-Sport TV in Australia, during Child
#> 2 Alcohol intoxication at Swedish football matches: A study using biologic
#> 3 Symptoms of Insomnia and Sleep Duration and Their Association with Incid
```

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

Remove DOIs for annotations (i.e., corrections) and Viewpoints articles
Expand All @@ -214,7 +214,7 @@ searchplos(q='*:*', fl=c('id','article_type'),
#> # A tibble: 1 x 2
#> numFound start
#> <int> <int>
#> 1 1951780 0
#> 1 1981731 0
#>
#> $data
#> # A tibble: 5 x 2
Expand Down Expand Up @@ -242,21 +242,21 @@ facetplos(q='alcohol', facet.field=c('journal','subject'), facet.limit=5)
#> # A tibble: 5 x 2
#> term value
#> <chr> <chr>
#> 1 plos one 24612
#> 2 plos genetics 563
#> 3 plos medicine 484
#> 4 plos neglected tropical diseases 446
#> 5 plos pathogens 334
#> 1 plos one 25036
#> 2 plos genetics 568
#> 3 plos medicine 494
#> 4 plos neglected tropical diseases 452
#> 5 plos pathogens 336
#>
#> $facet_fields$subject
#> # A tibble: 5 x 2
#> term value
#> <chr> <chr>
#> 1 biology and life sciences 26399
#> 2 medicine and health sciences 23550
#> 3 research and analysis methods 15125
#> 4 biochemistry 12900
#> 5 physical sciences 9913
#> 1 biology and life sciences 26830
#> 2 medicine and health sciences 23943
#> 3 research and analysis methods 15350
#> 4 biochemistry 13072
#> 5 physical sciences 10085
#>
#>
#> $facet_pivot
Expand Down Expand Up @@ -385,7 +385,7 @@ plossubject(q='marine ecology', fl = c('id','journal'), limit = 10)
#> # A tibble: 1 x 2
#> numFound start
#> <int> <int>
#> 1 3811 0
#> 1 3872 0
#>
#> $data
#> # A tibble: 10 x 2
Expand Down Expand Up @@ -429,11 +429,11 @@ Visualize word use across articles
plosword(list('monkey','Helianthus','sunflower','protein','whale'), vis = 'TRUE')
#> $table
#> No_Articles Term
#> 1 12367 monkey
#> 2 529 Helianthus
#> 3 1484 sunflower
#> 4 140626 protein
#> 5 1716 whale
#> 1 12514 monkey
#> 2 541 Helianthus
#> 3 1513 sunflower
#> 4 142150 protein
#> 5 1745 whale
#>
#> $plot
```
Expand Down
102 changes: 48 additions & 54 deletions inst/vign/facethighlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,22 @@ facetplos(q='*:*', facet.field='journal')
#>
#> $facet_fields
#> $facet_fields$journal
#> X1 X2
#> 1 plos one 1407216
#> 2 plos genetics 54150
#> 3 plos pathogens 47708
#> 4 plos computational biology 41170
#> 5 plos neglected tropical diseases 41072
#> 6 plos biology 30012
#> 7 plos medicine 21466
#> 8 plos clinical trials 496
#> 9 plos medicin 9
#>
#> # A tibble: 9 x 2
#> term value
#> <chr> <chr>
#> 1 plos one 1687125
#> 2 plos genetics 63261
#> 3 plos pathogens 56916
#> 4 plos neglected tropical diseases 52484
#> 5 plos computational biology 49163
#> 6 plos biology 34626
#> 7 plos medicine 25102
#> 8 plos clinical trials 521
#> 9 plos medicin 9
#>
#>
#> $facet_pivot
#> NULL
#>
#> $facet_dates
#> NULL
Expand All @@ -71,22 +76,29 @@ facetplos(q='*:*', facet.field='journal', facet.query='cell,bird')

```
#> $facet_queries
#> term value
#> 1 cell,bird 24
#> # A tibble: 1 x 2
#> term value
#> <chr> <int>
#> 1 cell,bird 6
#>
#> $facet_fields
#> $facet_fields$journal
#> X1 X2
#> 1 plos one 1407216
#> 2 plos genetics 54150
#> 3 plos pathogens 47708
#> 4 plos computational biology 41170
#> 5 plos neglected tropical diseases 41072
#> 6 plos biology 30012
#> 7 plos medicine 21466
#> 8 plos clinical trials 496
#> 9 plos medicin 9
#>
#> # A tibble: 9 x 2
#> term value
#> <chr> <chr>
#> 1 plos one 1687125
#> 2 plos genetics 63261
#> 3 plos pathogens 56916
#> 4 plos neglected tropical diseases 52484
#> 5 plos computational biology 49163
#> 6 plos biology 34626
#> 7 plos medicine 25102
#> 8 plos clinical trials 521
#> 9 plos medicin 9
#>
#>
#> $facet_pivot
#> NULL
#>
#> $facet_dates
#> NULL
Expand All @@ -105,24 +117,6 @@ facetplos(q='*:*', url=url, facet.date='publication_date',
```

```
#> $facet_queries
#> NULL
#>
#> $facet_fields
#> NULL
#>
#> $facet_dates
#> $facet_dates$publication_date
#> date value
#> 1 2017-02-23T00:00:00Z 2749
#> 2 2017-02-24T00:00:00Z 1878
#> 3 2017-02-25T00:00:00Z 0
#> 4 2017-02-26T00:00:00Z 689
#> 5 2017-02-27T00:00:00Z 689
#> 6 2017-02-28T00:00:00Z 0
#>
#>
#> $facet_ranges
#> NULL
```

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

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

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

```
#> $`10.1371/journal.pmed.0040151`
#> $`10.1371/journal.pmed.0040151`$abstract
#> [1] "Background: <em>Alcohol</em>"
#> $`10.1371/journal.pone.0185457`
#> $`10.1371/journal.pone.0185457`$abstract
#> [1] "Objectives: <em>Alcohol</em>"
#>
#>
#> $`10.1371/journal.pone.0027752`
#> $`10.1371/journal.pone.0027752`$abstract
#> [1] " of <em>alcohol</em> on TB management"
#> $`10.1371/journal.pone.0071284`
#> $`10.1371/journal.pone.0071284`$abstract
#> [1] "\n<em>Alcohol</em> dependence"
```

Search for the term _experiment_ across all sections of an article, return
Expand Down
Binary file modified inst/vign/figure/plosword1plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified inst/vign/figure/throughtime1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 27 additions & 28 deletions inst/vign/fulltext.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,26 @@ full_text_urls(dois)
```

```
#> [1] "http://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1000942&type=manuscript"
#> [2] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0130089&type=manuscript"
#> [3] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0165670&type=manuscript"
#> [4] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1002909&type=manuscript"
#> [5] "http://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1004317&type=manuscript"
#> [6] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.1002259&type=manuscript"
#> [7] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003554&type=manuscript"
#> [8] "http://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1004432&type=manuscript"
#> [9] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0162873&type=manuscript"
#> [10] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0163015&type=manuscript"
#> [11] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003597&type=manuscript"
#> [12] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1004934&type=manuscript"
#> [13] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1004795&type=manuscript"
#> [14] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.0000004&type=manuscript"
#> [15] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003631&type=manuscript"
#> [16] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003549&type=manuscript"
#> [17] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003507&type=manuscript"
#> [18] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.0000040&type=manuscript"
#> [19] "http://journals.plos.org/plosbiology/article/file?id=10.1371/journal.pbio.0000026&type=manuscript"
#> [20] "http://journals.plos.org/plosgenetics/article/file?id=10.1371/journal.pgen.1003332&type=manuscript"
#> [1] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0044136&type=manuscript"
#> [2] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0155491&type=manuscript"
#> [3] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168631&type=manuscript"
#> [4] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0058100&type=manuscript"
#> [5] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168627&type=manuscript"
#> [6] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0184491&type=manuscript"
#> [7] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0155489&type=manuscript"
#> [8] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0072057&type=manuscript"
#> [9] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0127059&type=manuscript"
#> [10] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168605&type=manuscript"
#> [11] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0058079&type=manuscript"
#> [12] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168602&type=manuscript"
#> [13] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0044129&type=manuscript"
#> [14] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0058091&type=manuscript"
#> [15] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0184468&type=manuscript"
#> [16] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0141298&type=manuscript"
#> [17] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0168604&type=manuscript"
#> [18] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0155469&type=manuscript"
#> [19] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0184467&type=manuscript"
#> [20] "http://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0085513&type=manuscript"
```

### Get XML
Expand Down Expand Up @@ -148,8 +148,7 @@ if (requireNamespace("xml2")) {
```

```
#> [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."
#> [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."
#> [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."
```

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

```
#> $`10.1371/journal.pone.0130089`
#> $`10.1371/journal.pone.0155491`
#> {xml_node}
#> <ref id="pone.0130089.ref001">
#> <ref id="pone.0155491.ref001">
#> [1] <label>1</label>
#> [2] <mixed-citation xlink:type="simple" publication-type="book"><name na ...
#> [2] <mixed-citation publication-type="journal" xlink:type="simple"><name ...
#>
#> $`10.1371/journal.pone.0165670`
#> $`10.1371/journal.pone.0168631`
#> {xml_node}
#> <ref id="pone.0165670.ref001">
#> <ref id="pone.0168631.ref001">
#> [1] <label>1</label>
#> [2] <mixed-citation publication-type="book" xlink:type="simple"><collab> ...
#> [2] <mixed-citation publication-type="journal" xlink:type="simple"><name ...
```
Loading

0 comments on commit f20102e

Please sign in to comment.