View source: R/length_frequency_wrappers.R
getStratumLengthFrequency | R Documentation |
Calculates length frequency for each stratum
getStratumLengthFrequency( x, species, length_bins = NULL, merge_protected = TRUE, ... )
x |
A list containing three data.frames:
|
species |
A character vector containing scientific names, common names, or species codes for the desired species, or a combination thereof |
length_bins |
A numeric vector of lengths, in centimenters, by which to bin the data. If NULL (default), will not bin the data. Note: Lengths below the minimum and above the maximum value in length_bins will be assigned <NA> (with no differentiation between below and above the provided bins). It is suggested that the bins match or exceed the range of lengths for the species in which you are interested |
merge_protected |
A boolean indicating whether protected and unprotected areas should be merged (TRUE, the default), or should be calculated seperately (FALSE) |
... |
Optional filters to apply to the data:
|
A data.frame with:
The year
A code for the region: DRY TORT - Dry Tortugas, SEFCRI - Southeast Peninsular Florida, FLA KEYS - Florida Keys
A code for the stratum
A boolean indicating protected status: 1 - Protected, 2 - Unprotected
The species code. The first three letters of the genus name and first four of the species name
The actual measured lengths, in cm, if length_bins = NULL, or an interval, if length_bins is not NULL
The relative frequency of each length class within each stratum
getRvcData
getDomainLengthFrequency
## Get rvc data from the Florida Keys in 2005 fk2005 = getRvcData(years = 2005, regions = "FLA KEYS") ## Calculate stratum length frequencies for Mangrove Snapper getStratumLengthFrequency(fk2005, species = "LUT GRIS") ## Calculate length frequencies for mangrove snappers in ## 1cm bins getStratumLengthFrequency(fk2005, species = "LUT GRIS", length_bins = seq(0,100,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.