plot_pres_vs_bg {tidysdm} | R Documentation |
Plot presences vs background
Description
Create a composite plots contrasting the distribution of multiple variables for presences vs the background.
Usage
plot_pres_vs_bg(.data, .col)
Arguments
.data |
a |
.col |
the column containing the presences; it assumes presences to be the first level of this factor |
Value
a patchwork
composite plot
Examples
data("bradypus", package = "maxnet")
bradypus_tb <- tibble::as_tibble(bradypus) %>%
dplyr::mutate(presence = relevel(
factor(
dplyr::case_match(presence, 1 ~ "presence", 0 ~ "absence")
),
ref = "presence"
)) %>%
select(-ecoreg)
bradypus_tb %>% plot_pres_vs_bg(presence)
[Package tidysdm version 0.9.5 Index]