Skip to contents

Get annual averages of seagrass frequency occurrence by bay segments, year, and species

Usage

anlz_transectavespp(
  transectocc,
  bay_segment = c("OTB", "HB", "MTB", "LTB", "BCB"),
  yrrng = c(1998, 2021),
  species = c("Halodule", "Syringodium", "Thalassia", "Ruppia", "Halophila",
    "Caulerpa"),
  total = TRUE,
  by_seg = FALSE
)

Arguments

transectocc

data frame returned by anlz_transectocc

bay_segment

chr string for the bay segment, one to many of "OTB", "HB", "MTB", "LTB", "BCB"

yrrng

numeric indicating year ranges to evaluate

species

chr string of species to summarize, one to many of "Halodule", "Syringodium", "Thalassia", "Ruppia", "Halophila", "Caulerpa"

total

logical indicating if total frequency occurrence for all species is also returned

by_seg

logical indicating if separate results by bay segments are retained

Value

A data frame of annual averages by bay segment

Details

Frequency occurrence estimates are averaged across segments in bay_segment if by_seg = F, i.e., separate results by location are not returned. Results are retained by bay segment if by_seg = T. Also note that totals across species (total = T) are not returned if by_seg = T.

Examples

if (FALSE) {
transect <- read_transect()
}
transectocc <- anlz_transectocc(transect)
anlz_transectavespp(transectocc)
#> # A tibble: 168 × 3
#>       yr  foest Savspecies 
#>    <dbl>  <dbl> <fct>      
#>  1  1998 0.578  total      
#>  2  1998 0.362  Halodule   
#>  3  1998 0.0435 Syringodium
#>  4  1998 0.247  Thalassia  
#>  5  1998 0.0115 Ruppia     
#>  6  1998 0      Halophila  
#>  7  1998 0.0170 Caulerpa   
#>  8  1999 0.516  total      
#>  9  1999 0.305  Halodule   
#> 10  1999 0.0701 Syringodium
#> # … with 158 more rows