Title: | Yield Per Recruit |
---|---|
Description: | An implementation of equilibrium-based yield per recruit methods. Yield per recruit methods can used to estimate the optimal yield for a fish population as described by Walters and Martell (2004) <isbn:0-691-11544-3>. The yield can be based on the number of fish caught (or harvested) or biomass caught for all fish or just large (trophy) individuals. |
Authors: | Joe Thorley [aut, cre] , Ayla Pearson [ctb] , Poisson Consulting [cph, fnd] |
Maintainer: | Joe Thorley <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.6.0.9007 |
Built: | 2024-12-20 01:20:30 UTC |
Source: | https://github.com/poissonconsulting/ypr |
The population parameters for Bull Trout in Adams Lake from Bison et al (2003)
adams_bt_03
adams_bt_03
An object of class ypr_population()
.
Bison, R., O’Brien, D., and Martell, S.J.D. 2003. An Analysis of Sustainable Fishing Options for Adams Lake Bull Trout Using Life History and Telemetry Data. BC Ministry of Water Land and Air Protection, Kamloops, B.C.
Other data:
chilliwack_bt_05
,
kootenay_bt_13
,
kootenay_rb
,
kootenay_rb_13
,
quesnel_bt
,
quesnel_lt
,
quesnel_rb
adams_bt_03 ypr_plot_yield(adams_bt_03)
adams_bt_03 ypr_plot_yield(adams_bt_03)
Coerce to an Ecotypes Object
as_ypr_ecotypes(x, ...) ## S3 method for class 'data.frame' as_ypr_ecotypes(x, ...) ## S3 method for class 'ypr_population' as_ypr_ecotypes(x, ...) ## S3 method for class 'ypr_populations' as_ypr_ecotypes(x, ...) ## S3 method for class 'ypr_ecotypes' as_ypr_ecotypes(x, ...)
as_ypr_ecotypes(x, ...) ## S3 method for class 'data.frame' as_ypr_ecotypes(x, ...) ## S3 method for class 'ypr_population' as_ypr_ecotypes(x, ...) ## S3 method for class 'ypr_populations' as_ypr_ecotypes(x, ...) ## S3 method for class 'ypr_ecotypes' as_ypr_ecotypes(x, ...)
x |
The object to coerce. |
... |
Additional arguments. |
An object of class ypr_ecotypes.
as_ypr_ecotypes(data.frame)
: Coerce a data.frame to an Ecotypes Object
as_ypr_ecotypes(ypr_population)
: Coerce a Population Object to an Ecotypes Object
as_ypr_ecotypes(ypr_populations)
: Coerce a Populations Object to an Ecotypes Object
as_ypr_ecotypes(ypr_ecotypes)
: Coerce an Ecotypes Object to an Ecotypes Object
Other ecotypes:
ypr_ecotypes()
as_ypr_ecotypes(as.data.frame(ypr_ecotypes(Ls = c(10, 15, 20)))) as_ypr_ecotypes(ypr_population()) as_ypr_ecotypes(ypr_populations(Ls = c(10, 15, 20))) as_ypr_ecotypes(ypr_ecotypes(Ls = c(10, 15, 20)))
as_ypr_ecotypes(as.data.frame(ypr_ecotypes(Ls = c(10, 15, 20)))) as_ypr_ecotypes(ypr_population()) as_ypr_ecotypes(ypr_populations(Ls = c(10, 15, 20))) as_ypr_ecotypes(ypr_ecotypes(Ls = c(10, 15, 20)))
Coerce to a Population Object
as_ypr_population(x, ...) ## S3 method for class 'data.frame' as_ypr_population(x, ...) ## S3 method for class 'ypr_population' as_ypr_population(x, ...) ## S3 method for class 'ypr_populations' as_ypr_population(x, ...) ## S3 method for class 'ypr_ecotypes' as_ypr_population(x, ...) ## S3 method for class 'data.frame' as_ypr_populations(x, ...)
as_ypr_population(x, ...) ## S3 method for class 'data.frame' as_ypr_population(x, ...) ## S3 method for class 'ypr_population' as_ypr_population(x, ...) ## S3 method for class 'ypr_populations' as_ypr_population(x, ...) ## S3 method for class 'ypr_ecotypes' as_ypr_population(x, ...) ## S3 method for class 'data.frame' as_ypr_populations(x, ...)
x |
The object to coerce. |
... |
Unused. |
An object of class ypr_population.
as_ypr_population(data.frame)
: Coerce a data.frame to an Population Object
as_ypr_population(ypr_population)
: Coerce a Population Object to an Population Object
as_ypr_population(ypr_populations)
: Coerce a Populations Object of length 1 to a Population Object
as_ypr_population(ypr_ecotypes)
: Coerce a Ecotypes Object of length 1 to a Population Object
as_ypr_populations(data.frame)
: Coerce a data.frame to a Populations Object
as_ypr_population(as.data.frame(ypr_population())) as_ypr_population(ypr_populations()) as_ypr_population(ypr_populations()) as_ypr_population(ypr_ecotypes()) as_ypr_populations(as.data.frame(ypr_populations(Rk = c(3, 4))))
as_ypr_population(as.data.frame(ypr_population())) as_ypr_population(ypr_populations()) as_ypr_population(ypr_populations()) as_ypr_population(ypr_ecotypes()) as_ypr_populations(as.data.frame(ypr_populations(Rk = c(3, 4))))
Coerce to a Populations Object
as_ypr_populations(x, ...) ## S3 method for class 'ypr_population' as_ypr_populations(x, ...) ## S3 method for class 'ypr_populations' as_ypr_populations(x, ...) ## S3 method for class 'ypr_ecotypes' as_ypr_populations(x, ...)
as_ypr_populations(x, ...) ## S3 method for class 'ypr_population' as_ypr_populations(x, ...) ## S3 method for class 'ypr_populations' as_ypr_populations(x, ...) ## S3 method for class 'ypr_ecotypes' as_ypr_populations(x, ...)
x |
The object to coerce. |
... |
Unused. |
An object of class ypr_ecotypes.
as_ypr_populations(ypr_population)
: Coerce a Population Object to an Population Object
as_ypr_populations(ypr_populations)
: Coerce a Populations Object of length 1 to a Population Object
as_ypr_populations(ypr_ecotypes)
: Coerce a Ecotypes Object of length 1 to a Population Object
Other populations:
chilliwack_bt_05
,
ypr_plot_yield()
,
ypr_populations()
,
ypr_populations_expand()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
as_ypr_populations(ypr_population()) as_ypr_populations(ypr_populations()) as_ypr_populations(ypr_ecotypes())
as_ypr_populations(ypr_population()) as_ypr_populations(ypr_populations()) as_ypr_populations(ypr_ecotypes())
Checks if an ypr_ecotypes object with valid parameter values.
check_ecotypes(x, x_name = NULL)
check_ecotypes(x, x_name = NULL)
x |
The object to check. |
x_name |
A string of the name of object x or NULL. |
An informative error if the test fails or an invisible copy of x.
Other check:
check_population()
,
check_populations()
check_ecotypes(ypr_ecotypes())
check_ecotypes(ypr_ecotypes())
Checks if an ypr_population object with valid parameter values.
check_population(x, x_name = NULL)
check_population(x, x_name = NULL)
x |
The object to check. |
x_name |
A string of the name of object x or NULL. |
An informative error if the test fails or an invisible copy of x.
Other check:
check_ecotypes()
,
check_populations()
check_population(ypr_population())
check_population(ypr_population())
Checks if an ypr_populations object with valid parameter values.
check_populations(x, x_name = NULL)
check_populations(x, x_name = NULL)
x |
The object to check. |
x_name |
A string of the name of object x or NULL. |
An informative error if the test fails or an invisible copy of x.
Other check:
check_ecotypes()
,
check_population()
check_populations(ypr_populations())
check_populations(ypr_populations())
The populations parameters for Bull Trout in Chilliwack Lake from Taylor (2005)
chilliwack_bt_05
chilliwack_bt_05
An object of class ypr_populations()
.
Taylor, J.L. 2005. Sustainability of the Chilliwack Lake Char Fishery. Ministry of Water, Land and Air Protection, Surrey, B.C.
Other populations:
as_ypr_populations()
,
ypr_plot_yield()
,
ypr_populations()
,
ypr_populations_expand()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other data:
adams_bt_03
,
kootenay_bt_13
,
kootenay_rb
,
kootenay_rb_13
,
quesnel_bt
,
quesnel_lt
,
quesnel_rb
chilliwack_bt_05 yield <- ypr_tabulate_yield(chilliwack_bt_05, type = "optimal") yield$pi <- round(yield$pi, 2) yield <- yield[c("Llo", "Hm", "Rk", "pi")] yield <- tidyr::spread(yield, Rk, pi) yield <- yield[order(-yield$Hm), ] yield ## Not run: ypr_plot_yield(chilliwack_bt_05, plot_values = FALSE) + ggplot2::facet_grid(Rk ~ Hm) + ggplot2::aes(group = Llo, linetype = Llo) ## End(Not run)
chilliwack_bt_05 yield <- ypr_tabulate_yield(chilliwack_bt_05, type = "optimal") yield$pi <- round(yield$pi, 2) yield <- yield[c("Llo", "Hm", "Rk", "pi")] yield <- tidyr::spread(yield, Rk, pi) yield <- yield[order(-yield$Hm), ] yield ## Not run: ypr_plot_yield(chilliwack_bt_05, plot_values = FALSE) + ggplot2::facet_grid(Rk ~ Hm) + ggplot2::aes(group = Llo, linetype = Llo) ## End(Not run)
Tests if is a Population, Populations or Ecotypes
is.ypr_population(x) is_ypr_population(x) is.ypr_populations(x) is_ypr_populations(x) is.ypr_ecotypes(x) is_ypr_ecotypes(x)
is.ypr_population(x) is_ypr_population(x) is.ypr_populations(x) is_ypr_populations(x) is.ypr_ecotypes(x) is_ypr_ecotypes(x)
x |
The object to test. |
is_ypr_population()
: Test if is a Population
is.ypr_populations()
: Test if is a Populations
is_ypr_populations()
: Test if is a Populations
is.ypr_ecotypes()
: Test if is an Ecotypes
is_ypr_ecotypes()
: Test if is an Ecotypes
is.ypr_population(ypr_population()) is_ypr_population(ypr_population()) is.ypr_populations(ypr_populations()) is_ypr_population(ypr_populations()) is.ypr_ecotypes(ypr_ecotypes()) is_ypr_ecotypes(ypr_ecotypes())
is.ypr_population(ypr_population()) is_ypr_population(ypr_population()) is.ypr_populations(ypr_populations()) is_ypr_population(ypr_populations()) is.ypr_ecotypes(ypr_ecotypes()) is_ypr_ecotypes(ypr_ecotypes())
The population parameters for Bull Trout in Kootenay Lake from Andrusak and Thorley (2013)
kootenay_bt_13
kootenay_bt_13
An object of class ypr_population()
.
The estimates should not be used for management.
Andrusak, G.F., and Thorley, J.L. 2013. Kootenay Lake Exploitation Study: Fishing and Natural Mortality of Large Rainbow Trout and Bull Trout: 2013 Annual Report. A Poisson Consulting Ltd. and Redfish Consulting Ltd. Report, Habitat Conservation Trust Foundation, Victoria, BC.
Other data:
adams_bt_03
,
chilliwack_bt_05
,
kootenay_rb
,
kootenay_rb_13
,
quesnel_bt
,
quesnel_lt
,
quesnel_rb
kootenay_bt_13 ypr_plot_yield(kootenay_bt_13)
kootenay_bt_13 ypr_plot_yield(kootenay_bt_13)
The population parameters for Rainbow Trout in Kootenay Lake.
kootenay_rb
kootenay_rb
An object of class ypr_population()
.
The estimates are liable to change and should not be used for management.
Thorley, J.L., and Andrusak, G.F. 2017. The fishing and natural mortality of large, piscivorous Bull Trout and Rainbow Trout in Kootenay Lake, British Columbia (2008–2013). PeerJ 5: e2874. doi:10.7717/peerj.2874.
Other data:
adams_bt_03
,
chilliwack_bt_05
,
kootenay_bt_13
,
kootenay_rb_13
,
quesnel_bt
,
quesnel_lt
,
quesnel_rb
kootenay_rb ypr_plot_yield(kootenay_rb)
kootenay_rb ypr_plot_yield(kootenay_rb)
The population parameters for Rainbow Trout in Kootenay Lake from Andrusak and Thorley (2013)
kootenay_rb_13
kootenay_rb_13
An object of class ypr_population()
.
The estimates should not be used for management.
Andrusak, G.F., and Thorley, J.L. 2013. Kootenay Lake Exploitation Study: Fishing and Natural Mortality of Large Rainbow Trout and Bull Trout: 2013 Annual Report. A Poisson Consulting Ltd. and Redfish Consulting Ltd. Report, Habitat Conservation Trust Foundation, Victoria, BC.
Other data:
adams_bt_03
,
chilliwack_bt_05
,
kootenay_bt_13
,
kootenay_rb
,
quesnel_bt
,
quesnel_lt
,
quesnel_rb
kootenay_rb_13 ypr_plot_yield(kootenay_rb_13)
kootenay_rb_13 ypr_plot_yield(kootenay_rb_13)
Plot Population Schedule
## S3 method for class 'ypr_population' plot(x, type = "b", ...)
## S3 method for class 'ypr_population' plot(x, type = "b", ...)
x |
The population to plot. |
type |
A string specifying the plot type. Possible values include 'b', 'p' and 'l'. |
... |
Additional arguments passed to graphics::plot function. |
An invisible copy of the original object.
## Not run: plot(ypr_population()) ## End(Not run)
## Not run: plot(ypr_population()) ## End(Not run)
The population parameters for Bull Trout in Quesnel Lake, BC.
quesnel_bt
quesnel_bt
An object of class ypr_population()
.
The estimates are liable to change and should not be used for management.
Other data:
adams_bt_03
,
chilliwack_bt_05
,
kootenay_bt_13
,
kootenay_rb
,
kootenay_rb_13
,
quesnel_lt
,
quesnel_rb
quesnel_bt ypr_plot_yield(quesnel_bt)
quesnel_bt ypr_plot_yield(quesnel_bt)
The population parameters for Lake Trout in Quesnel Lake, BC.
quesnel_lt
quesnel_lt
An object of class ypr_population()
.
The estimates are liable to change and should not be used for management.
Other data:
adams_bt_03
,
chilliwack_bt_05
,
kootenay_bt_13
,
kootenay_rb
,
kootenay_rb_13
,
quesnel_bt
,
quesnel_rb
quesnel_lt ypr_plot_yield(quesnel_lt)
quesnel_lt ypr_plot_yield(quesnel_lt)
The population parameters for Rainbow Trout in Quesnel Lake, BC.
quesnel_rb
quesnel_rb
An object of class ypr_population()
.
The estimates are liable to change and should not be used for management.
Other data:
adams_bt_03
,
chilliwack_bt_05
,
kootenay_bt_13
,
kootenay_rb
,
kootenay_rb_13
,
quesnel_bt
,
quesnel_lt
quesnel_rb ypr_plot_yield(quesnel_rb)
quesnel_rb ypr_plot_yield(quesnel_rb)
Age At Length
ypr_age_at_length(population, length)
ypr_age_at_length(population, length)
population |
An object of class |
length |
A numeric vector of the length (cm). |
A double vector of the lengths.
Other calculate:
ypr_exploitation()
,
ypr_length_at_age()
,
ypr_optimize()
,
ypr_yield()
,
ypr_yields()
ypr_age_at_length(ypr_population(), seq(0, 100, by = 10))
ypr_age_at_length(ypr_population(), seq(0, 100, by = 10))
Detabulate Population Parameters
ypr_detabulate_parameters(x)
ypr_detabulate_parameters(x)
x |
A data frame with columns Parameter and Value specifying one or more parameters and their values. |
An object of class ypr_population()
Other tabulate:
ypr_report()
,
ypr_tabulate_biomass()
,
ypr_tabulate_fish()
,
ypr_tabulate_parameters()
,
ypr_tabulate_schedule()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other parameters:
ypr_tabulate_parameters()
ypr_detabulate_parameters(ypr_tabulate_parameters(ypr_population()))
ypr_detabulate_parameters(ypr_tabulate_parameters(ypr_population()))
Creates an ypr_ecotypes object.
ypr_ecotypes(..., names = NULL)
ypr_ecotypes(..., names = NULL)
... |
Unused parameters. |
names |
A character vector of unique ecotype names. |
An ypr_ecotypes()
objects
Other ecotypes:
as_ypr_ecotypes()
ypr_ecotypes(Linf = c(1, 2)) ypr_ecotypes(Linf = c(1, 2), t0 = c(0, 0.5))
ypr_ecotypes(Linf = c(1, 2)) ypr_ecotypes(Linf = c(1, 2), t0 = c(0, 0.5))
Converts capture probabilities into exploitation probabilities based on the release and handling mortality probabilities where the probability of exploitation includes handling mortalities. The calculation assumes that a released fish cannot be recaught in the same year.
ypr_exploitation(object, pi = ypr_get_par(object))
ypr_exploitation(object, pi = ypr_get_par(object))
object |
The population or populations. |
pi |
A vector of capture probabilities to calculate the exploitation probabilities for. |
In the case of no release (or 100% handling mortalities) the exploitation probability is identical to the capture probability. Otherwise it is less.
A vector of exploitation probabilities.
Other calculate:
ypr_age_at_length()
,
ypr_length_at_age()
,
ypr_optimize()
,
ypr_yield()
,
ypr_yields()
ypr_exploitation(ypr_population(pi = 0.4)) ypr_exploitation(ypr_population(pi = 0.4, rho = 0.6, Hm = 0.2))
ypr_exploitation(ypr_population(pi = 0.4)) ypr_exploitation(ypr_population(pi = 0.4, rho = 0.6, Hm = 0.2))
Get Parameter Value
ypr_get_par(object, par = "pi")
ypr_get_par(object, par = "pi")
object |
A ypr object. |
par |
A string of the parameter. |
A numeric or integer scalar or vector of the parameter value.
ypr_get_par(ypr_population())
ypr_get_par(ypr_population())
Length At Age
ypr_length_at_age(population, age)
ypr_length_at_age(population, age)
population |
An object of class |
age |
A numeric vector of the age (yr). |
A double vector of the lengths.
Other calculate:
ypr_age_at_length()
,
ypr_exploitation()
,
ypr_optimize()
,
ypr_yield()
,
ypr_yields()
ypr_length_at_age(ypr_population(), seq(0, 5, by = 0.5))
ypr_length_at_age(ypr_population(), seq(0, 5, by = 0.5))
Generates set of unique names based on differences in parameter values.
ypr_names(x, ...) ## S3 method for class 'ypr_population' ypr_names(x, ...) ## S3 method for class 'ypr_populations' ypr_names(x, ...) ## S3 method for class 'ypr_ecotypes' ypr_names(x, ...)
ypr_names(x, ...) ## S3 method for class 'ypr_population' ypr_names(x, ...) ## S3 method for class 'ypr_populations' ypr_names(x, ...) ## S3 method for class 'ypr_ecotypes' ypr_names(x, ...)
x |
An object of class ypr_population, ypr_populations or ypr_ecotypes. |
... |
Unused. |
Parameter RPR is ignored because it is irrelevant to population(s) and does not distinguish between ecotypes.
A character vector of the unique parameter based names.
ypr_names(ypr_population)
: Population Names
ypr_names(ypr_populations)
: Populations Names
ypr_names(ypr_ecotypes)
: Ecotypes Names
ypr_names(ypr_population()) ypr_names(ypr_populations()) ypr_names(ypr_populations())
ypr_names(ypr_population()) ypr_names(ypr_populations()) ypr_names(ypr_populations())
Finds the annual interval capture probability (pi) that maximises the yield for a given population.
ypr_optimize(object, Ly = 0, harvest = TRUE, biomass = FALSE)
ypr_optimize(object, Ly = 0, harvest = TRUE, biomass = FALSE)
object |
The population or populations. |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
The annual interval capture probability (pi) that maximises the yield.
Other calculate:
ypr_age_at_length()
,
ypr_exploitation()
,
ypr_length_at_age()
,
ypr_yield()
,
ypr_yields()
ypr_optimize(ypr_population())
ypr_optimize(ypr_population())
Produces a frequency histogram of the total fish 'Biomass' or 'Eggs' deposition by 'Age' class.
ypr_plot_biomass(population, y = "Biomass", color = NULL)
ypr_plot_biomass(population, y = "Biomass", color = NULL)
population |
An object of class |
y |
A string of the term on the y-axis. |
color |
A string of the color around each bar (or NULL). |
A ggplot2 object.
Other biomass:
ypr_tabulate_biomass()
Other plot:
ypr_plot_fish()
,
ypr_plot_schedule()
,
ypr_plot_sr()
,
ypr_plot_yield()
ypr_plot_biomass(ypr_population(), color = "white")
ypr_plot_biomass(ypr_population(), color = "white")
Produces a frequency histogram of the number of fish in the 'Survivors', 'Spawners', 'Caught', 'Harvested' or 'Released' categories by 'Length', 'Age' or 'Weight' class.
ypr_plot_fish( population, x = "Age", y = "Survivors", percent = FALSE, binwidth = 1L, color = NULL )
ypr_plot_fish( population, x = "Age", y = "Survivors", percent = FALSE, binwidth = 1L, color = NULL )
population |
An object of class |
x |
The object to coerce. |
y |
A string of the term on the y-axis. |
percent |
A flag specifying whether to plot the number of fish as a percent or frequency (the default). |
binwidth |
A positive integer of the width of the bins for grouping. |
color |
A string of the color around each bar (or NULL). |
A ggplot2 object.
Other fish:
ypr_tabulate_fish()
Other plot:
ypr_plot_biomass()
,
ypr_plot_schedule()
,
ypr_plot_sr()
,
ypr_plot_yield()
ypr_plot_fish(ypr_population(), color = "white")
ypr_plot_fish(ypr_population(), color = "white")
Produces a bivariate line plot of two schedule terms.
ypr_plot_schedule(population, x = "Age", y = "Length")
ypr_plot_schedule(population, x = "Age", y = "Length")
population |
An object of class |
x |
A string of the term on the x-axis. |
y |
A string of the term on the y-axis. |
A ggplot2 object.
Other schedule:
ypr_tabulate_schedule()
Other plot:
ypr_plot_biomass()
,
ypr_plot_fish()
,
ypr_plot_sr()
,
ypr_plot_yield()
ypr_plot_schedule(ypr_population())
ypr_plot_schedule(ypr_population())
Plot Stock-Recruitment Curve
ypr_plot_sr( population, Ly = 0, harvest = TRUE, biomass = FALSE, plot_values = TRUE )
ypr_plot_sr( population, Ly = 0, harvest = TRUE, biomass = FALSE, plot_values = TRUE )
population |
An object of class |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
plot_values |
A flag specifying whether to plot the actual and optimal values. |
A ggplot2 object.
Other sr:
ypr_sr()
,
ypr_tabulate_sr()
Other plot:
ypr_plot_biomass()
,
ypr_plot_fish()
,
ypr_plot_schedule()
,
ypr_plot_yield()
ypr_plot_sr(ypr_population(Rk = 10)) ypr_plot_sr(ypr_population(Rk = 10, BH = 0L))
ypr_plot_sr(ypr_population(Rk = 10)) ypr_plot_sr(ypr_population(Rk = 10, BH = 0L))
Plots the 'Yield', 'Age', 'Length', 'Weight', 'Effort', or 'YPUE' by the annual interval capture/exploitation probability.
ypr_plot_yield(object, ...) ## Default S3 method: ypr_plot_yield( object, y = "Yield", pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, u = harvest, plot_values = TRUE, ... ) ## S3 method for class 'ypr_populations' ypr_plot_yield( object, y = "Yield", pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, u = harvest, plot_values = TRUE, ... )
ypr_plot_yield(object, ...) ## Default S3 method: ypr_plot_yield( object, y = "Yield", pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, u = harvest, plot_values = TRUE, ... ) ## S3 method for class 'ypr_populations' ypr_plot_yield( object, y = "Yield", pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, u = harvest, plot_values = TRUE, ... )
object |
The population or populations. |
... |
Unused parameters. |
y |
A string of the term on the y-axis. |
pi |
A vector of probabilities of capture to calculate the yield for. |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
u |
A flag specifying whether to plot the exploitation rate as opposed to the capture rate. |
plot_values |
A flag specifying whether to plot the actual and optimal values. |
A ggplot2 object.
ypr_plot_yield(default)
: Plot Yield by Capture
ypr_plot_yield(ypr_populations)
: Plot Yield by Capture
Other populations:
as_ypr_populations()
,
chilliwack_bt_05
,
ypr_populations()
,
ypr_populations_expand()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other yield:
ypr_tabulate_yield()
,
ypr_yield()
,
ypr_yields()
Other plot:
ypr_plot_biomass()
,
ypr_plot_fish()
,
ypr_plot_schedule()
,
ypr_plot_sr()
## Not run: ypr_plot_yield( ypr_populations( Rk = c(2.5, 4.6), Llo = c(0, 60) ), plot_values = FALSE ) + ggplot2::facet_wrap(~Llo) + ggplot2::aes(group = Rk, color = Rk) + ggplot2::scale_color_manual(values = c("black", "blue")) ypr_plot_yield(ypr_populations(Rk = c(2.5, 4.6), Llo = c(0, 60))) + ggplot2::facet_grid(Rk ~ Llo) ## End(Not run) ypr_plot_yield(ypr_population())
## Not run: ypr_plot_yield( ypr_populations( Rk = c(2.5, 4.6), Llo = c(0, 60) ), plot_values = FALSE ) + ggplot2::facet_wrap(~Llo) + ggplot2::aes(group = Rk, color = Rk) + ggplot2::scale_color_manual(values = c("black", "blue")) ypr_plot_yield(ypr_populations(Rk = c(2.5, 4.6), Llo = c(0, 60))) + ggplot2::facet_grid(Rk ~ Llo) ## End(Not run) ypr_plot_yield(ypr_population())
Generates an object of class ypr_population
.
ypr_population( tmax = 20L, k = 0.15, Linf = 100, t0 = 0, k2 = 0.15, Linf2 = 100, L2 = 1000, Wb = 3, Ls = 50, Sp = 100, es = 1, Sm = 0, fb = 1, tR = 1L, BH = 1L, Rk = 3, n = 0.2, nL = 0.2, Ln = 1000, Lv = 50, Vp = 100, Llo = 0, Lup = 1000, Nc = 0, pi = 0.2, rho = 0, Hm = 0, Rmax = 1, Wa = 0.01, fa = 1, q = 0.1, RPR = 1 )
ypr_population( tmax = 20L, k = 0.15, Linf = 100, t0 = 0, k2 = 0.15, Linf2 = 100, L2 = 1000, Wb = 3, Ls = 50, Sp = 100, es = 1, Sm = 0, fb = 1, tR = 1L, BH = 1L, Rk = 3, n = 0.2, nL = 0.2, Ln = 1000, Lv = 50, Vp = 100, Llo = 0, Lup = 1000, Nc = 0, pi = 0.2, rho = 0, Hm = 0, Rmax = 1, Wa = 0.01, fa = 1, q = 0.1, RPR = 1 )
tmax |
The maximum age (yr). |
k |
The VB growth coefficient (yr-1). |
Linf |
The VB mean maximum length (cm). |
t0 |
The (theoretical) age at zero length (yr). |
k2 |
The VB growth coefficient after length L2 (yr-1). |
Linf2 |
The VB mean maximum length after length L2 (cm). |
L2 |
The length (or age if negative) at which growth switches from the first to second phase (cm or yr). |
Wb |
The weight (as a function of length) scaling exponent. |
Ls |
The length (or age if negative) at which 50 % mature (cm or yr). |
Sp |
The maturity (as a function of length) power. |
es |
The annual probability of a mature fish spawning. |
Sm |
The spawning mortality probability. |
fb |
The fecundity (as a function of weight) scaling exponent. |
tR |
The age from which survival is density-independent (yr). |
BH |
Recruitment follows a Beverton-Holt (1) or Ricker (0) relationship. |
Rk |
The lifetime spawners per spawner at low density (or the egg to tR survival if between 0 and 1). |
n |
The annual interval natural mortality rate from age tR. |
nL |
The annual interval natural mortality rate from length Ln. |
Ln |
The length (or age if negative) at which the annual interval natural mortality rate switches from n to nL (cm or yr). |
Lv |
The length (or age if negative) at which 50 % vulnerable to harvest (cm or yr). |
Vp |
The vulnerability to harvest (as a function of length) power. |
Llo |
The lower harvest slot length (cm). |
Lup |
The upper harvest slot length (cm). |
Nc |
The slot limits non-compliance probability. |
pi |
The annual capture probability. |
rho |
The release probability. |
Hm |
The hooking mortality probability. |
Rmax |
The number of recruits at the carrying capacity (ind). |
Wa |
The (extrapolated) weight of a 1 cm individual (g). |
fa |
The (theoretical) fecundity of a 1 g female (eggs). |
q |
The catchability (annual probability of capture) for a unit of effort. |
RPR |
The relative proportion of recruits that are of the ecotype. |
An object of class ypr_population
.
ypr_population(k = 0.1, Linf = 90)
ypr_population(k = 0.1, Linf = 90)
Generates set of unique names based on differences in parameter values.
ypr_population_names(population)
ypr_population_names(population)
population |
An object of class ypr_population, ypr_populations or ypr_ecotypes. |
A character vector of the unique parameter based names.
for ypr_update()
.
ypr_population_update(population, ...)
ypr_population_update(population, ...)
population |
A ypr_population object. |
... |
One or more parameter values from |
Populations
ypr_populations(..., expand = TRUE, names = NULL)
ypr_populations(..., expand = TRUE, names = NULL)
... |
Unused parameters. |
expand |
A flag specifying whether to expand parameter combinations. |
names |
A character vector of unique ecotype names. |
A list of ypr_population()
objects
Other populations:
as_ypr_populations()
,
chilliwack_bt_05
,
ypr_plot_yield()
,
ypr_populations_expand()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
ypr_populations(Rk = c(2.5, 4.6), Hm = c(0.2, 0.05))
ypr_populations(Rk = c(2.5, 4.6), Hm = c(0.2, 0.05))
An object of class ypr_population()
of all unique combinations of parameter
values.
ypr_populations_expand(populations)
ypr_populations_expand(populations)
populations |
An object of class |
An object of class ypr_population
.
Other populations:
as_ypr_populations()
,
chilliwack_bt_05
,
ypr_plot_yield()
,
ypr_populations()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
ypr_populations_expand( ypr_populations( Rk = c(2.5, 4, 2.5), Hm = c(0.1, 0.2, 0.1) ) )
ypr_populations_expand( ypr_populations( Rk = c(2.5, 4, 2.5), Hm = c(0.1, 0.2, 0.1) ) )
Creates an Rmd file that can be used to generate a report.
ypr_report( population, Ly = 0, harvest = TRUE, biomass = FALSE, title = "Population Report", description = "", date = Sys.Date(), file = "report", view = FALSE, ask = TRUE )
ypr_report( population, Ly = 0, harvest = TRUE, biomass = FALSE, title = "Population Report", description = "", date = Sys.Date(), file = "report", view = FALSE, ask = TRUE )
population |
An object of class |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
title |
A string of the report title. |
description |
A string describing the population. |
date |
A date of the report date. |
file |
A string of the path to the file (without the extension). |
view |
A flag specifying whether to view the report (after rendering it to html). |
ask |
A flag specifying whether to ask before overwriting or creating a file. |
An invisible character vector of the contents of the file.
Other tabulate:
ypr_detabulate_parameters()
,
ypr_tabulate_biomass()
,
ypr_tabulate_fish()
,
ypr_tabulate_parameters()
,
ypr_tabulate_schedule()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
## Not run: ypr_report(ypr_population(), file = tempfile(), ask = FALSE) ## End(Not run)
## Not run: ypr_report(ypr_population(), file = tempfile(), ask = FALSE) ## End(Not run)
Returns a single rowed data frame of the SR parameters:
Survival from egg to age tR at low density
Density-dependence
Lifetime spawners per spawner at low density
Lifetime eggs deposited per recruit at unfished equilibrium
Lifetime eggs deposited per recruit at the fished equilibrium
Age tR recruits at the unfished equilibrium
Age tR recruits at the fished equilibrium
Spawners at the unfished equilibrium
Spawners at the fished equilibrium
ypr_sr(object)
ypr_sr(object)
object |
The population or populations. |
A data frame of the SR parameters.
Other sr:
ypr_plot_sr()
,
ypr_tabulate_sr()
ypr_sr(ypr_population()) # Beverton-Holt ypr_sr(ypr_population(BH = 0L)) # Ricker
ypr_sr(ypr_population()) # Beverton-Holt ypr_sr(ypr_population(BH = 0L)) # Ricker
Produces a data frame of the 'Weight' and 'Fecundity' and the number of 'Survivors' and 'Spawners' and the total 'Biomass' and 'Eggs' by 'Age' class.
ypr_tabulate_biomass(population)
ypr_tabulate_biomass(population)
population |
An object of class |
A data frame
Other tabulate:
ypr_detabulate_parameters()
,
ypr_report()
,
ypr_tabulate_fish()
,
ypr_tabulate_parameters()
,
ypr_tabulate_schedule()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other biomass:
ypr_plot_biomass()
ypr_tabulate_biomass(ypr_population())
ypr_tabulate_biomass(ypr_population())
Produces a data frame of the number of fish in the 'Survivors', 'Spawners', 'Caught', 'Harvested', 'Released' and 'HandlingMortalities' categories by 'Length', 'Age' or 'Weight' class and 'Ecotype' (NA if not applicable)
ypr_tabulate_fish(population, x = "Age", binwidth = 1L)
ypr_tabulate_fish(population, x = "Age", binwidth = 1L)
population |
An object of class |
x |
The object to coerce. |
binwidth |
A positive integer of the width of the bins for grouping. |
A data frame
Other tabulate:
ypr_detabulate_parameters()
,
ypr_report()
,
ypr_tabulate_biomass()
,
ypr_tabulate_parameters()
,
ypr_tabulate_schedule()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other fish:
ypr_plot_fish()
ypr_tabulate_fish(ypr_population())
ypr_tabulate_fish(ypr_population())
Tabulate Population Parameters
ypr_tabulate_parameters(population)
ypr_tabulate_parameters(population)
population |
An object of class |
A table of population parameters
Other tabulate:
ypr_detabulate_parameters()
,
ypr_report()
,
ypr_tabulate_biomass()
,
ypr_tabulate_fish()
,
ypr_tabulate_schedule()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other parameters:
ypr_detabulate_parameters()
ypr_tabulate_parameters(ypr_population())
ypr_tabulate_parameters(ypr_population())
Generates the life-history schedule by age for a population.
ypr_tabulate_schedule(object, ...) ## S3 method for class 'ypr_population' ypr_tabulate_schedule(object, ...) ## S3 method for class 'ypr_ecotypes' ypr_tabulate_schedule(object, ...)
ypr_tabulate_schedule(object, ...) ## S3 method for class 'ypr_population' ypr_tabulate_schedule(object, ...) ## S3 method for class 'ypr_ecotypes' ypr_tabulate_schedule(object, ...)
object |
The population or populations. |
... |
Unused parameters. |
A tibble of the life-history schedule by age.
ypr_tabulate_schedule(ypr_population)
: Tabulate Schedule
ypr_tabulate_schedule(ypr_ecotypes)
: Tabulate Schedule
Other tabulate:
ypr_detabulate_parameters()
,
ypr_report()
,
ypr_tabulate_biomass()
,
ypr_tabulate_fish()
,
ypr_tabulate_parameters()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other schedule:
ypr_plot_schedule()
ypr_tabulate_schedule(ypr_population()) ypr_tabulate_schedule(ypr_ecotypes(Linf = c(10, 20)))
ypr_tabulate_schedule(ypr_population()) ypr_tabulate_schedule(ypr_ecotypes(Linf = c(10, 20)))
Tabulate Stock-Recruitment Parameters
ypr_tabulate_sr(object, ...) ## Default S3 method: ypr_tabulate_sr( object, Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... ) ## S3 method for class 'ypr_populations' ypr_tabulate_sr( object, Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... )
ypr_tabulate_sr(object, ...) ## Default S3 method: ypr_tabulate_sr( object, Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... ) ## S3 method for class 'ypr_populations' ypr_tabulate_sr( object, Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... )
object |
The population or populations. |
... |
Unused parameters. |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
all |
A flag specifying whether to include all parameter values. |
A data.frame of stock-recruitment parameters.
ypr_tabulate_sr(default)
: Tabulate Stock-Recruitment Parameters
ypr_tabulate_sr(ypr_populations)
: Tabulate Stock-Recruitment Parameters
Other tabulate:
ypr_detabulate_parameters()
,
ypr_report()
,
ypr_tabulate_biomass()
,
ypr_tabulate_fish()
,
ypr_tabulate_parameters()
,
ypr_tabulate_schedule()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other populations:
as_ypr_populations()
,
chilliwack_bt_05
,
ypr_plot_yield()
,
ypr_populations()
,
ypr_populations_expand()
,
ypr_tabulate_yield()
,
ypr_tabulate_yields()
Other sr:
ypr_plot_sr()
,
ypr_sr()
ypr_tabulate_sr(ypr_population()) # Beverton-Holt ypr_tabulate_sr(ypr_population(BH = 0L)) # Ricker ypr_tabulate_sr(ypr_populations(Rk = c(2.5, 4.6)))
ypr_tabulate_sr(ypr_population()) # Beverton-Holt ypr_tabulate_sr(ypr_population(BH = 0L)) # Ricker ypr_tabulate_sr(ypr_populations(Rk = c(2.5, 4.6)))
Tabulate Yield
ypr_tabulate_yield(object, ...) ## Default S3 method: ypr_tabulate_yield( object, Ly = 0, harvest = TRUE, biomass = FALSE, type = "both", all = FALSE, ... ) ## S3 method for class 'ypr_populations' ypr_tabulate_yield( object, Ly = 0, harvest = TRUE, biomass = FALSE, type = "both", all = FALSE, ... )
ypr_tabulate_yield(object, ...) ## Default S3 method: ypr_tabulate_yield( object, Ly = 0, harvest = TRUE, biomass = FALSE, type = "both", all = FALSE, ... ) ## S3 method for class 'ypr_populations' ypr_tabulate_yield( object, Ly = 0, harvest = TRUE, biomass = FALSE, type = "both", all = FALSE, ... )
object |
The population or populations. |
... |
Unused parameters. |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
type |
A string indicating whether to include 'both' or just the 'actual' or 'optimal' yield. |
all |
A flag specifying whether to include all parameter values. |
A data frame.
ypr_tabulate_yield(default)
: Tabulate Yield
ypr_tabulate_yield(ypr_populations)
: Tabulate Yield
Other tabulate:
ypr_detabulate_parameters()
,
ypr_report()
,
ypr_tabulate_biomass()
,
ypr_tabulate_fish()
,
ypr_tabulate_parameters()
,
ypr_tabulate_schedule()
,
ypr_tabulate_sr()
,
ypr_tabulate_yields()
Other populations:
as_ypr_populations()
,
chilliwack_bt_05
,
ypr_plot_yield()
,
ypr_populations()
,
ypr_populations_expand()
,
ypr_tabulate_sr()
,
ypr_tabulate_yields()
Other yield:
ypr_plot_yield()
,
ypr_yield()
,
ypr_yields()
ypr_tabulate_yield(ypr_population()) ypr_tabulate_yield(ypr_populations(Rk = c(3, 5)))
ypr_tabulate_yield(ypr_population()) ypr_tabulate_yield(ypr_populations(Rk = c(3, 5)))
Tabulate Yields
ypr_tabulate_yields(object, ...) ## Default S3 method: ypr_tabulate_yields( object, pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... ) ## S3 method for class 'ypr_populations' ypr_tabulate_yields( object, pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... )
ypr_tabulate_yields(object, ...) ## Default S3 method: ypr_tabulate_yields( object, pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... ) ## S3 method for class 'ypr_populations' ypr_tabulate_yields( object, pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE, all = FALSE, ... )
object |
The population or populations. |
... |
Unused parameters. |
pi |
A vector of probabilities of capture to calculate the yield for. |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
all |
A flag specifying whether to include all parameter values. |
A data frame.
ypr_tabulate_yields(default)
: Tabulate Yields
ypr_tabulate_yields(ypr_populations)
: Tabulate Yields
Other tabulate:
ypr_detabulate_parameters()
,
ypr_report()
,
ypr_tabulate_biomass()
,
ypr_tabulate_fish()
,
ypr_tabulate_parameters()
,
ypr_tabulate_schedule()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
Other populations:
as_ypr_populations()
,
chilliwack_bt_05
,
ypr_plot_yield()
,
ypr_populations()
,
ypr_populations_expand()
,
ypr_tabulate_sr()
,
ypr_tabulate_yield()
ypr_tabulate_yields(ypr_population()) ypr_tabulate_yields( ypr_populations( Rk = c(3, 5) ), pi = seq(0, 1, length.out = 10) ) ypr_tabulate_yields(ypr_ecotypes(Linf = c(10, 20)))
ypr_tabulate_yields(ypr_population()) ypr_tabulate_yields( ypr_populations( Rk = c(3, 5) ), pi = seq(0, 1, length.out = 10) ) ypr_tabulate_yields(ypr_ecotypes(Linf = c(10, 20)))
Update a YPR Object Currently just works with scalar parameters for populations and ecotypes.
ypr_update(x, ...) ## S3 method for class 'ypr_population' ypr_update(x, ...) ## S3 method for class 'ypr_populations' ypr_update(x, ...) ## S3 method for class 'ypr_ecotypes' ypr_update(x, ...)
ypr_update(x, ...) ## S3 method for class 'ypr_population' ypr_update(x, ...) ## S3 method for class 'ypr_populations' ypr_update(x, ...) ## S3 method for class 'ypr_ecotypes' ypr_update(x, ...)
x |
A population, populations or ecotypes object to update. |
... |
One or more parameter values from |
ypr_update(ypr_population)
: Update Population Parameters
ypr_update(ypr_populations)
: Update Populations Parameters
ypr_update(ypr_ecotypes)
: Update Populations Parameters
ypr_update(ypr_population(), Rk = 2.5) ypr_update(ypr_populations(Rk = c(2.5, 4)), Rk = 2.5) ypr_update(ypr_ecotypes(Linf = c(2.5, 4)), k = 1.5)
ypr_update(ypr_population(), Rk = 2.5) ypr_update(ypr_populations(Rk = c(2.5, 4)), Rk = 2.5) ypr_update(ypr_ecotypes(Linf = c(2.5, 4)), k = 1.5)
Calculates the yield for a population.
ypr_yield(object, Ly = 0, harvest = TRUE, biomass = FALSE, ...)
ypr_yield(object, Ly = 0, harvest = TRUE, biomass = FALSE, ...)
object |
The population or populations. |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
... |
Unused parameters. |
By default, with Rmax = 1
the number of individuals is the proportion of
the recruits at the carrying capacity. If the yield is given in terms of the
biomass (kg) then the scaling also depends on the value of Wa
(g).
The yield as number of fish or biomass.
Other yield:
ypr_plot_yield()
,
ypr_tabulate_yield()
,
ypr_yields()
Other calculate:
ypr_age_at_length()
,
ypr_exploitation()
,
ypr_length_at_age()
,
ypr_optimize()
,
ypr_yields()
ypr_yield(ypr_population()) ypr_yield(ypr_ecotypes(Linf = c(100, 200)))
ypr_yield(ypr_population()) ypr_yield(ypr_ecotypes(Linf = c(100, 200)))
Calculates the yield(s) for a population based on one or more capture rates.
ypr_yields( object, pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE )
ypr_yields( object, pi = seq(0, 1, length.out = 100), Ly = 0, harvest = TRUE, biomass = FALSE )
object |
The population or populations. |
pi |
A vector of probabilities of capture to calculate the yield for. |
Ly |
The minimum length (trophy) fish to consider when calculating the yield (cm). |
harvest |
A flag specifying whether to calculate the yield for harvested fish or captures. |
biomass |
A flag specifying whether to calculate the yield in terms of the biomass versus number of individuals. |
A numeric vector of the yields.
Other yield:
ypr_plot_yield()
,
ypr_tabulate_yield()
,
ypr_yield()
Other calculate:
ypr_age_at_length()
,
ypr_exploitation()
,
ypr_length_at_age()
,
ypr_optimize()
,
ypr_yield()
pi <- seq(0, 1, length.out = 30) plot(pi, ypr_yields(ypr_population(), pi), type = "l")
pi <- seq(0, 1, length.out = 30) plot(pi, ypr_yields(ypr_population(), pi), type = "l")