Title: | A package for analyzing FL FWC Freshwater long-term monitoring (LTM) data |
---|---|
Description: | Provides functions for summarizing and analyzing FL FWC Freshwater Fish Long-term Monitoring Data. |
Authors: | Jason O'Connor [aut, cre] |
Maintainer: | Jason O'Connor <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.4 |
Built: | 2024-11-06 05:13:16 UTC |
Source: | https://github.com/jasonO6359/flfishltm |
Add zero count data for species missing from sample
add_zero_count(data, sample_ids, species_id, count, format = "long")
add_zero_count(data, sample_ids, species_id, count, format = "long")
data |
dataset as data.frame or tibble |
sample_ids |
sample id variables |
species_id |
species ID field |
count |
field containing species counts |
format |
defaults to "long" - data returned with 1 row per sample_id x species_id, else if not "long" returns data in "wide" format, with one row per sample_id and 1 column per unique species in the species_id. |
tibble
fish_data <- tibble( site = c(1:5,3:7), species_name = c(rep("BLUE", 5), rep("RESU", 5)), ct = c(5, 2, 6, 4, 7, 8, 6, 7, 2, 9), minutes = rep(10, 10)) fish_data %>% add_zero_count(sample_ids = c(site,minutes), species_id = species_name, count = ct)
fish_data <- tibble( site = c(1:5,3:7), species_name = c(rep("BLUE", 5), rep("RESU", 5)), ct = c(5, 2, 6, 4, 7, 8, 6, 7, 2, 9), minutes = rep(10, 10)) fish_data %>% add_zero_count(sample_ids = c(site,minutes), species_id = species_name, count = ct)
Generate age-length key from a subsample of aged fish
age.key(dataset, age_column, length_column, length_unit = NA)
age.key(dataset, age_column, length_column, length_unit = NA)
dataset |
dataset containing at least 2 columns, one containing an age field, and one containing length field |
age_column |
string specifying the name of the column containing ages (in years) |
length_column |
string specifying the name of the column containing lengths |
length_unit |
string specifying the length units options are: "mm" = millimeters; "cm" = centimeters, if none specified defaults to "mm" |
returns age-length key
data(loch_blcr_2020_age) loch_blcr_alk <- age.key(dataset=loch_blcr_2020_age, age_column="age", length_column="tl", length_unit = 'mm')
data(loch_blcr_2020_age) loch_blcr_alk <- age.key(dataset=loch_blcr_2020_age, age_column="age", length_column="tl", length_unit = 'mm')
helper function triggers error if expected column names are missing
check_expected_columns(input_table, expected_names)
check_expected_columns(input_table, expected_names)
input_table |
|
expected_names |
test_data <- data.frame(col1 = 1, col2 = 2, col3 = "A") check_expected_columns(test_data, c("col1", "col2"))
test_data <- data.frame(col1 = 1, col2 = 2, col3 = "A") check_expected_columns(test_data, c("col1", "col2"))
Calculate Mean Catch-per-unit Effort (CPUE)
cpue(data, count, effort)
cpue(data, count, effort)
data |
|
effort |
name of column (unquoted) specifying the sample effort value (typically minutes) |
species |
name of column (unquoted) for species for which CPUE is desired |
named vector containing "Mean CPUE" and "SE" estimates
fish_data <- tibble( site = c(1:5,3:7), species_name = c(rep("BLUE", 5), rep("RESU", 5)), ct = c(5, 2, 6, 4, 7, 8, 6, 7, 2, 9), minutes = rep(10, 10)) fish_data %>% cpue(ct, "minutes") # can specify column name as either a symbol or character fish_data %>% group_by(species_name) %>% # use dplyr::group_by to specify grouping variables. cpue(ct, "minutes") # fish_data %>% # add_zero_count(c(site,minutes), species_name, ct) %>% #use [add_zero_count()]to account for missing absence data # group_by(species_name) %>% # cpue(ct, "minutes")
fish_data <- tibble( site = c(1:5,3:7), species_name = c(rep("BLUE", 5), rep("RESU", 5)), ct = c(5, 2, 6, 4, 7, 8, 6, 7, 2, 9), minutes = rep(10, 10)) fish_data %>% cpue(ct, "minutes") # can specify column name as either a symbol or character fish_data %>% group_by(species_name) %>% # use dplyr::group_by to specify grouping variables. cpue(ct, "minutes") # fish_data %>% # add_zero_count(c(site,minutes), species_name, ct) %>% #use [add_zero_count()]to account for missing absence data # group_by(species_name) %>% # cpue(ct, "minutes")
Create CPUE timeseries for species and years selected
cpue_plot( datafile, speciesList = list(), species_size_strata = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1, return_object = "data" )
cpue_plot( datafile, speciesList = list(), species_size_strata = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1, return_object = "data" )
datafile |
data, should be output from ltm.data.summary function |
speciesList |
list of selected species, can specify by common name, scientific name or species code |
species_size_strata |
optional argument, specifies size strata groups for which CPUEs should be calculated, see example below for proper convention. |
years |
list of years to include in figure |
seasons |
—currently functionless, will update in future version, to avoid errors make sure that all seasons in input dataset are the same— |
print |
boolean, if TRUE figure will be saved to file |
figure_filename |
if print=TRUE, figure will be saved to this filename |
fig_scale |
adjust to scale output figure size |
return_object |
string if "data" then function returns the dataset that is used to generate the figure, else if "ggplot" then function returns ggplot object |
either summarised data or a ggplot object. Specify the return object type with return_object
# import and format data data(newnans) newn_sum <- ltm.data.summary("Newnans Lake", newnans) # CPUE plots for bluegill, largemouth bass, and brown bullheads newnans_cpue <- cpue_plot(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020)) # CPUE plots by size class newnans_cpue2 <- cpue_plot(newn_sum, speciesList=c("BLUE","LMB","BRBU"), species_size_strata = list( BLUE = list( YOY = c(0,8), Quality = c(18,50)), LMB = list( YOY = c(0,20), Quality = c(30,50), Trophy = c(51,100)) ), years = c(2016:2020) )
# import and format data data(newnans) newn_sum <- ltm.data.summary("Newnans Lake", newnans) # CPUE plots for bluegill, largemouth bass, and brown bullheads newnans_cpue <- cpue_plot(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020)) # CPUE plots by size class newnans_cpue2 <- cpue_plot(newn_sum, speciesList=c("BLUE","LMB","BRBU"), species_size_strata = list( BLUE = list( YOY = c(0,8), Quality = c(18,50)), LMB = list( YOY = c(0,20), Quality = c(30,50), Trophy = c(51,100)) ), years = c(2016:2020) )
DEPRECATED as of 5/6/2024 use cpue_plot()
instead.
cpue.plot( datafile, speciesList = list(), species_size_strata = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1 )
cpue.plot( datafile, speciesList = list(), species_size_strata = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1 )
datafile |
data, should be output from ltm.data.summary function |
speciesList |
list of selected species, can specify by common name, scientific name or species code |
species_size_strata |
optional argument, specifies size strata groups for which CPUEs should be calculated, see example below for proper convention. |
years |
list of years to include in figure |
seasons |
—currently functionless, will update in future version, to avoid errors make sure that all seasons in input dataset are the same— |
print |
boolean, if TRUE figure will be saved to file |
figure_filename |
if print=TRUE, figure will be saved to this filename |
fig_scale |
adjust to scale output figure size |
Create CPUE timeseries for species and years selected
Returns the summarized data used to construct the plot
# import and format data data(newnans) newn_sum <- ltm.data.summary("Newnans Lake", newnans) # CPUE plots for bluegill, largemouth bass, and brown bullheads newnans_cpue <- cpue.plot(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020)) # CPUE plots by size class newnans_cpue2 <- cpue.plot(newn_sum, speciesList=c("BLUE","LMB","BRBU"), species_size_strata = list( BLUE = list( YOY = c(0,8), Quality = c(18,50)), LMB = list( YOY = c(0,20), Quality = c(30,50), Trophy = c(51,100)) ), years = c(2016:2020) )
# import and format data data(newnans) newn_sum <- ltm.data.summary("Newnans Lake", newnans) # CPUE plots for bluegill, largemouth bass, and brown bullheads newnans_cpue <- cpue.plot(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020)) # CPUE plots by size class newnans_cpue2 <- cpue.plot(newn_sum, speciesList=c("BLUE","LMB","BRBU"), species_size_strata = list( BLUE = list( YOY = c(0,8), Quality = c(18,50)), LMB = list( YOY = c(0,20), Quality = c(30,50), Trophy = c(51,100)) ), years = c(2016:2020) )
A helper function, intended to be called from within create_ltm_report()
create_ltm_analysis_template( catch_data = "qryFish_standard.csv", age_data = NULL, habitat_data = "qrySite_comprehensive.csv" )
create_ltm_analysis_template( catch_data = "qryFish_standard.csv", age_data = NULL, habitat_data = "qrySite_comprehensive.csv" )
catch_data |
string name of a csv file containing catch data. Data should be in format generated by 'Standard Fish Query' and stored in the /data directory of the ltm report template. |
age_data |
FUTURE FEATURE string name of a csv file containing age data |
habitat_data |
FUTURE FEATURE string name of a csv file containing habitat data. Data should be in format generated by 'Comprehensive Site Data' query and stored in the /data directory of the ltm report template. |
string containing r script text
## Not run: create_ltm_analysis_template() ## End(Not run)
## Not run: create_ltm_analysis_template() ## End(Not run)
Create a new LTM report template
create_ltm_report(dir_name, report_name = dir_name, dir_root = getwd())
create_ltm_report(dir_name, report_name = dir_name, dir_root = getwd())
dir_name |
string specifying the name of the report directory to create |
report_name |
string specifying the report name, used in file names so avoid spaces defaults to name specified in directory |
dir_root |
string specifying the path to the root directory in which to create the report project. Defaults to the current working directory. |
boolean - returns TRUE
if the function executes without error
## Not run: create_ltm_report(dir_name = "test_report", report_name ="LakeDoe_LMB_2020") ## End(Not run)
## Not run: create_ltm_report(dir_name = "test_report", report_name ="LakeDoe_LMB_2020") ## End(Not run)
INTERNAL: Create a deprecation warning
deprecate(new_function)
deprecate(new_function)
warning message
deprecated_function <- function() { deprecate("new_function") } deprecated_function()
deprecated_function <- function() { deprecate("new_function") } deprecated_function()
Species lookup table for freshwater fish.
fish_table
fish_table
A dataframe with 321 obs and 7 variables
Species field code
common name
binomial scientific name
categorical variable grouping species as "Exotic", "Fresh", or "Salt"
family name, scientific (latin)
family name, common
unique identification number for species, can be used as primary key
ADD PACKAGE DETAILS See
vignette("flfishltm", package="flfishltm")
intro to flfishltm for more details
Extract waypoint data from .gpx files
get_wpt(gpx)
get_wpt(gpx)
gpx |
A .gpx file generated using a Garmin GPSmap 78s |
data frame containing point ID, lat, long and elevation
# df <- get_wpt('Waypoints_01-DEC-22.gpx')
# df <- get_wpt('Waypoints_01-DEC-22.gpx')
Create Guild Composition plot
guild.comp( ltm_dataset, waterbody_list = list(), years = list(), color_scale = "default", save = FALSE )
guild.comp( ltm_dataset, waterbody_list = list(), years = list(), color_scale = "default", save = FALSE )
ltm_dataset |
data, should be output from ltm.data.summary function |
waterbody_list |
—currently functionless, will update in future version— |
years |
list of years to include in figure |
color_scale |
color scale for output figure defaults to default r color scale, other options include "grayscale" for black and white, and "viridis" for viridis magma scale |
save |
boolean, if TRUE figure will be saved to file |
returns summarize data used to construct figures
data(newnans) newn_sum <- ltm.data.summary(file=newnans) newnans_guild <- guild.comp(newn_sum)
data(newnans) newn_sum <- ltm.data.summary(file=newnans) newnans_guild <- guild.comp(newn_sum)
currently used within ltm.data.summary()
helper_addgapyears(sumTable)
helper_addgapyears(sumTable)
sumTable |
|
table
test_data <- structure(list( Year = c("2006 - 2007", "2007 - 2008", "2008 - 2009","2009 - 2010", "2010 - 2011", "2012 - 2013", "2013 - 2014", "2014 - 2015", "2015 - 2016", "2019 - 2020", "2020 - 2021"), yr = c(2006, 2007, 2008, 2009, 2010, 2012,2013, 2014, 2015, 2019, 2020), BOW = c(0.226666666666667, 0.24, 0.188, 0.252, 0.132, 0.02, 0.116, 0.112, 0.064, 0.26, 0.128), LMB = c(0.00666666666666667, 0.0733333333333333, 0.064, 0.084, 0.04, 0.02, 0.048, 0.148, 0.212, 0.136, 0.12)), row.names = c(NA, -11L), class = c("tbl_df", "tbl", "data.frame")) helper_addgapyears(test_data)
test_data <- structure(list( Year = c("2006 - 2007", "2007 - 2008", "2008 - 2009","2009 - 2010", "2010 - 2011", "2012 - 2013", "2013 - 2014", "2014 - 2015", "2015 - 2016", "2019 - 2020", "2020 - 2021"), yr = c(2006, 2007, 2008, 2009, 2010, 2012,2013, 2014, 2015, 2019, 2020), BOW = c(0.226666666666667, 0.24, 0.188, 0.252, 0.132, 0.02, 0.116, 0.112, 0.064, 0.26, 0.128), LMB = c(0.00666666666666667, 0.0733333333333333, 0.064, 0.084, 0.04, 0.02, 0.048, 0.148, 0.212, 0.136, 0.12)), row.names = c(NA, -11L), class = c("tbl_df", "tbl", "data.frame")) helper_addgapyears(test_data)
Checks whether value is an outlier
is.outlier(x)
is.outlier(x)
x |
vector of numerical values |
boolean
numbers = c(1:10,1:10,1:10,1000) numbers_outlier <- is.outlier(numbers) numbers[numbers_outlier]#'
numbers = c(1:10,1:10,1:10,1000) numbers_outlier <- is.outlier(numbers) numbers[numbers_outlier]#'
Check if data is from LTM Standard Fish Query
is.StdFishQry(x)
is.StdFishQry(x)
x |
dataset |
true/false
data(newnans) is.StdFishQry(newnans) #### is.StdFishQry(newnans[, -1]) ### new2 <- newnans new2$newcolumn <- NA is.StdFishQry(new2)
data(newnans) is.StdFishQry(newnans) #### is.StdFishQry(newnans[, -1]) ### new2 <- newnans new2$newcolumn <- NA is.StdFishQry(new2)
Create Length Distribution histograms for species and years selected
len_dist( datafile, speciesList = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1, return_object = "data" )
len_dist( datafile, speciesList = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1, return_object = "data" )
datafile |
data, should be output from ltm.data.summary function |
speciesList |
list of selected species, can specify by common name, scientific name or species code |
years |
list of years to include in figure |
seasons |
—currently functionless, will update in future version, to avoid errors make sure that all seasons in input dataset are the same— |
print |
boolean, if TRUE figure will be saved to file |
figure_filename |
if print=TRUE, figure will be saved to this filename |
fig_scale |
adjust to scale output figure size |
return_object |
string if "data" then function returns the dataset that is used to generate the figure, else if "ggplot" then function returns ggplot object |
either summarised data or a ggplot object. Specify the return object type with return_object
data(newnans) newn_sum <- ltm.data.summary("Newnans",newnans) newnans_LD <- len_dist(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020))
data(newnans) newn_sum <- ltm.data.summary("Newnans",newnans) newnans_LD <- len_dist(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020))
Create Length Distribution histograms for species and years selected
len.dist( datafile, speciesList = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1 )
len.dist( datafile, speciesList = list(), years = list(), seasons = list(), print = FALSE, figure_filename = NA, fig_scale = 1 )
datafile |
data, should be output from ltm.data.summary function |
speciesList |
list of selected species, can specify by common name, scientific name or species code |
years |
list of years to include in figure |
seasons |
—currently functionless, will update in future version, to avoid errors make sure that all seasons in input dataset are the same— |
print |
boolean, if TRUE figure will be saved to file |
figure_filename |
if print=TRUE, figure will be saved to this filename |
fig_scale |
adjust to scale output figure size |
Returns the summarized data used to construct the histogram plot
data(newnans) newn_sum <- ltm.data.summary("Newnans",newnans) newnans_LD <- len.dist(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020))
data(newnans) newn_sum <- ltm.data.summary("Newnans",newnans) newnans_LD <- len.dist(newn_sum, speciesList=c("BLUE","LMB", "BRBU"), years = c(2016:2020))
Contains total length and ages for the aged subsample of Black Crappie collected on Lochloosa Lake, FL during fall 2020 LTM trawl survyes
loch_blcr_2020_age
loch_blcr_2020_age
A dataframe with 103 obs and 5 variables
Waterbody where collection was made
collection date
Species code; BLCR = Black Crappie Pomoxis nigromaculatus
total length in mm
age determined from otolith reads assuming Jan 1 birthdate, in yrs
Summarize raw LTM data from "Standard Fish Query"
ltm.data.summary( waterbodyname = "No Waterbody Specified", file, outtables = 0, printfigs = 0, print_directory = getwd() )
ltm.data.summary( waterbodyname = "No Waterbody Specified", file, outtables = 0, printfigs = 0, print_directory = getwd() )
waterbodyname |
The name of the selected Waterbody as you would like it to appear in filenames and figure titles |
file |
path to the raw query file, should be a .csv file |
outtables |
option to specify which summary tables to save to working directory, default 0 exports no summary tables |
printfigs |
option to specify which figures to save to print directory, default 0 prints no figures, 1 prints all figures |
print_directory |
specify directory to save exported figures |
list of summarized datasets
#Import demo data for Newnans Lake data(newnans) #dplyr::summarise Newnans Lake data newn_sum <- ltm.data.summary("Newnans Lake", file = newnans) # Access summary tables within the newn_sum object newn_sum$SpeciesList newn_sum$CPUE_number newn_sum$RawData newn_sum$Comp_num
#Import demo data for Newnans Lake data(newnans) #dplyr::summarise Newnans Lake data newn_sum <- ltm.data.summary("Newnans Lake", file = newnans) # Access summary tables within the newn_sum object newn_sum$SpeciesList newn_sum$CPUE_number newn_sum$RawData newn_sum$Comp_num
Imports LTM Query data and performs a set of checks that will output warnings if file does not contain expected input, or if file contains data that may not work with 'flfishltm' functions
ltm.import(datafile)
ltm.import(datafile)
datafile |
an ltm query dataset, can be either ".csv" or ".Rdata" format |
imported dataset
data(newnans) newn <- ltm.import(newnans)
data(newnans) newn <- ltm.import(newnans)
Dataset containing fish collection for Newnans Lake for the period 2006- 2020. Data is output of "Standard Fish Query"
newnans
newnans
A data frame with 13,326 rows and 40 variables:
unique record ID #
lake, river or other resource where data were collected, Factor
FL County of Collection
collection date
collection time
Sampling protocol: "Standard", "Haphazard", "NS-Random", etc TODO FILL IN ALL PROTOCOLS
Target species
Sampling season
Sampling gear used
Effort, expressed as time in seconds
Distance covered during sample, in meters
site identification name or number
Latitude of starting location, decimal degrees
Longitude of starting location, decimal degrees
Predict Weigth at Length
predict_wt(species_code, tl, error = 0.5)
predict_wt(species_code, tl, error = 0.5)
species_code |
FWC LTM species code |
tl |
Total length (mm) |
error |
numeric error scale expressed as a % of estimate, defaults to 0.5 |
tibble containing tl, prediction, upper and lower bounds
predict_wt("BLUE", 150) predict_wt("BLUE", 150)
predict_wt("BLUE", 150) predict_wt("BLUE", 150)
Dataset containing fish collection for Santa Fe River for the period 2006- 2021. Data is output of "Standard Fish Query"
sfr_fish
sfr_fish
A dataframe with 321 obs and 7 variables
unique record ID #
lake, river or other resource where data were collected, Factor
FL County of Collection
collection date
collection time
Sampling protocol: "Standard", "Haphazard", "NS-Random", etc TODO FILL IN ALL PROTOCOLS
Target species
Sampling season
Sampling gear used
Effort, expressed as time in seconds
Distance covered during sample, in meters
site identification name or number
Latitude of starting location, decimal degrees
Longitude of starting location, decimal degrees
** NEED TO UPDATE METADATA **
Create Species detection history plot
species_history( LTMdataset, exclude_species = c(), save = FALSE, filename = NA, fig_res = NA, fig_width = NA, fig_height = NA, return_object = "data" )
species_history( LTMdataset, exclude_species = c(), save = FALSE, filename = NA, fig_res = NA, fig_width = NA, fig_height = NA, return_object = "data" )
exclude_species |
vector of string identifying the species names to exclude from the output figure. Should match the spelling of the species names in the figure. |
save |
boolean, if TRUE figure will be saved to file |
filename |
= filename for saved figure |
fig_res |
= specify figure resolution |
fig_width |
= specify figure width |
fig_height |
= specify figure height |
return_object |
string if "data" then function returns the dataset that is used to generate the figure, else if "ggplot" then function returns ggplot object |
ltm_dataset |
data, should be output from ltm.data.summary function |
either summarised data or a ggplot object. Specify the return object type with return_object
data(newnans) newn_sum <- ltm.data.summary(file=newnans) newnans_dethist <- species.history(newn_sum,save=FALSE)
data(newnans) newn_sum <- ltm.data.summary(file=newnans) newnans_dethist <- species.history(newn_sum,save=FALSE)
DEPRECATED as of 8/22/2023 use species_history()
instead.
species.history( LTMdataset, exclude_species = c(), save = FALSE, filename = NA, fig_res = NA, fig_width = NA, fig_height = NA, return_object = "data" )
species.history( LTMdataset, exclude_species = c(), save = FALSE, filename = NA, fig_res = NA, fig_width = NA, fig_height = NA, return_object = "data" )
save |
boolean, if TRUE figure will be saved to file |
filename |
= filename for saved figure |
fig_res |
= specify figure resolution |
fig_width |
= specify figure width |
fig_height |
= specify figure height |
return_object |
string if "data" then function returns the dataset that is used to generate the figure, else if "ggplot" then function returns ggplot object |
ltm_dataset |
data, should be output from ltm.data.summary function |
Create Species detection history plot
either summarised data or a ggplot object. Specify the return object type with return_object
data(newnans) newn_sum <- ltm.data.summary(file=newnans) newnans_dethist <- species.history(newn_sum,save=FALSE)
data(newnans) newn_sum <- ltm.data.summary(file=newnans) newnans_dethist <- species.history(newn_sum,save=FALSE)
Custom LTM theme for ggplot
theme_ltm()
theme_ltm()
theme for ggplot figures
data(newnans) ggplot2::ggplot(data=newnans, ggplot2::aes(x=TotalLength,y=TotalWeight)) + ggplot2::geom_point() + theme_ltm()
data(newnans) ggplot2::ggplot(data=newnans, ggplot2::aes(x=TotalLength,y=TotalWeight)) + ggplot2::geom_point() + theme_ltm()
Calculates the Relative Weight for a sample of fish with both lengths and weights
Wr(dataset = NA, length_col = NA, weight_col = NA, a = NA, b = NA)
Wr(dataset = NA, length_col = NA, weight_col = NA, a = NA, b = NA)
dataset |
dataset containing at least 2 columns, one containing a length field, and one containing weight field |
length_col |
string specifying the name of the column containing length |
weight_col |
string specifying the name of the column containing weights |
a |
value of the alpha parameter for relative weight calculation (specific to species of interest) |
b |
value of the beta parameter for relative weight calculation (specific to species of interest) |
returns vector of relative weights
library(dplyr) data(newnans) #Calculate relative weight for all LMB collected from Newnans Lake newn_lmb <- newnans %>% dplyr::filter(SpeciesCode == "LMB" ) newnans_lmb_Wr <- Wr(dataset = newn_lmb, length_col = "TotalLength", weight_col = "TotalWeight", a = .3245, b = 3.21)
library(dplyr) data(newnans) #Calculate relative weight for all LMB collected from Newnans Lake newn_lmb <- newnans %>% dplyr::filter(SpeciesCode == "LMB" ) newnans_lmb_Wr <- Wr(dataset = newn_lmb, length_col = "TotalLength", weight_col = "TotalWeight", a = .3245, b = 3.21)