pubs_per_year.Rd
Plot bar plot of the number of publications per year. I find facetting makes the plot easier to read than filling with different colors.
pubs_per_year(
pubs,
facet_by = NULL,
fill_by = NULL,
binwidth = 365,
preprints = TRUE,
n_top = Inf,
n_top_fill = Inf,
sort_by = c("first_appeared", "count", "recent_count"),
log_color = FALSE
)
A data frame with at least these columns:
Name of the journal of the paper.
Year when the paper was published.
There must be one row per publication or per method or species for each title if faceting by those. If facetting, then a column whose name is the value in `facet_by` must be present.
Name of a column for facetting.
Name of a column of a categorical variable with which to color the histogram.
Width of bins for the histogram in days.
Logical, whether preprints should be included. Defaults to `TRUE` to include preprints.
Number of categories with the most publications to plot in facets; the other categories are lumped into "other".
Number of categories with the most publications to be differentiated by color.
How to sort the facets. first_appeared means the category that appeared earlier will be nearer to the top. count means the category with more count (number of publications) will be nearer to the top. Ignored if not facetting.
If filling histograms by integer values, whether to log transform the values before mapping to colors to improve dynamic range.
A ggplot2 object.