Learn R Programming

alm (version 0.1.9)

plot_signposts: Plot PLOS article-level metrics data.

Description

This can be used in conjuction with the function signposts.

Usage

plot_signposts(input, type = "bar", width = 800, height = 500)

Arguments

input
A data.frame from a search from the signposts function
type
Type of chart, one of bar (default), multiBarChart, or multiBarHorizontalChart. multiBarChart or multiBarHorizontalChart options use the library rCharts, specifically the NVD3 javascript library. Choosing multiBarChart or multiBarHorizontalChart opens a v
width
Only applies with type="interactive", otherwise ignored. Width of the plotting area.
height
Only applies with type="interactive", otherwise ignored. Height of the plotting area.

Value

  • A data.frame of the signpost numbers for the searched object.

Details

Note that DOIs are the unit of replication of each study. When plotting, if the prefix is common among all DOIs, then just the end of the DOI, the numeric part is printed to make plots less ugly.

References

See a tutorial/vignette for alm at http://ropensci.org/tutorials/alm_tutorial.html

See Also

alm, plot_signposts

Examples

Run this code
# Plot data from a single identifier gives a bar chart
dat <- signposts(doi="10.1371/journal.pone.0029797")
plot_signposts(input=dat)

# Plot data from many identifiers gives a line chart
dois <- c('10.1371/journal.pone.0001543','10.1371/journal.pone.0040117',
   '10.1371/journal.pone.0029797','10.1371/journal.pone.0039395')
dat <- signposts(doi=dois)
plot_signposts(input=dat)

# Or you can make an interactive chart
plot_signposts(input=dat, type="multiBarChart")

# Lots of DOIs
library(rplos); library(rCharts)
dois <- searchplos('ecology', 'id', limit = 30)
dat <- signposts(doi=do.call(c,dois$id))
## multiBarChart
plot_signposts(input=dat, type="multiBarChart")
## multiBarHorizontalChart
plot_signposts(input=dat, type="multiBarHorizontalChart")

Run the code above in your browser using DataLab