hist_bool: Plot histogram for each value of a logical variable

View source: R/plot.R

hist_boolR Documentation

Plot histogram for each value of a logical variable

Description

Plots 3 histograms showing the number of publications per year for TRUE, FALSE, and NA, with the histogram overlaid on top of a translucent one for all values. There's one facet per row so it's easy to compare how things change with time.

Usage

hist_bool(pubs, col_use, binwidth = 365, preprints = TRUE)

Arguments

pubs

A data frame with at least these columns:

journal

Name of the journal of the paper.

year

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.

col_use

Which logical variable to plot. Tidyeval is supported.

binwidth

Width of bins for the histogram in days.

preprints

Logical, whether preprints should be included. Defaults to 'TRUE' to include preprints.

Value

A ggplot2 object


pachterlab/museumst documentation built on April 20, 2024, 11:26 p.m.