lock_order: Lock the order of the data in the plot

Description Usage Arguments Value Examples

View source: R/quick_plots.R

Description

lock_order() locks the order of the of an axis variable exactly as it appears in the data, rather than from the bottom up (for factors and numerics) or in alphabetical order (for characters).

Usage

1

Arguments

var

a variable to lock

rev

logical. Should the order be reversed to make it appear on the plot as in the data? Default is TRUE.

Value

a factor

Examples

1
2
3
4
5
library(ggplot2)

meta_analysis(iud_cxca, yi = lnes, sei = selnes, slab = study_name) %>%
  ggplot(aes(x = estimate, y = lock_order(study))) +
  geom_point()

malcolmbarrett/tidymeta documentation built on May 30, 2019, 11:42 a.m.