mermaid_plot_benthic_pit_percent_cover: Plot MERMAID Benthic PIT percent cover

Description Usage Arguments Examples

View source: R/mermaid_boxplot.R

Description

Plot box plots of Benthic PIT percent cover by a grouping variable group_var (e.g. benthic category), separated by a supplied compare_var (e.g. management rules).

Usage

1
2
3
4
5
6
7
8
mermaid_plot_benthic_pit_percent_cover(
  .data,
  group_var,
  compare_var,
  clean_values = TRUE,
  clean_values_case = c("title", "sentence"),
  replace_dashes = TRUE
)

Arguments

.data

Sample event data containing mean fish belt biomass, with variables indicated in group_var and compare_var. Likely the output from a mermaid_get_project_data() call.

group_var

Variable to group by, e.g. percent_cover_by_benthic_category_avg

compare_var

Variable to compare by, e.g. management_rules

clean_values

Whether to clean the values in group_var and compare_var (with title case as default - see clean_values_case), in case they are not clean (e.g. contain dashes, underscores, are lowercase, etc). Defaults to TRUE.

clean_values_case

The desired clean values case (default is "title"). For example, if a value is "invertivore-mobile", title case converts it to "Invertivore Mobile" while sentence case converts it to "Invertivore mobile". If you don't want to replace dashes with spaces (e.g. get "Interivore-Mobile", set replace_dashes = FALSE.

replace_dashes

Whether to also remove dashes from values when cleaning them. Defaults to TRUE.

Examples

1
2
3
4
5
6
library(mermaidr)
events <- mermaid_search_projects(name = "XPDC Kei Kecil 2018") %>%
  mermaid_get_project_data("benthicpit", "sampleevents")

events %>%
  mermaid_plot_benthic_pit_percent_cover(percent_cover_by_benthic_category_avg, reef_exposure)

data-mermaid/mermaidreporting documentation built on May 23, 2020, 7 a.m.