knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "90%" )
This R package allows for simple calculation of CWT estimates and bootstrap intervals for tag recovery and sampling in fisheries.
You can install the development version of cwtr from GitHub with:
# install.packages("remotes") remotes::install_github("justinpriest/cwtr", build_vignettes = TRUE)
cwtr allows you to quickly calculate point estimates using
the function cwtEst()
.
library(cwtr) x <- cwtEst(N=c(33666,NA), n=7618, lambda=c(138,140,116,116), m=1, theta=c(0.01886,102.15)) summary(x)
The function cwtBoot()
calculates bootstrapped intervals for
the cwt estimates and can be specified for different methods.
library(cwtr) x <- cwtEst(N=c(33666,NA), n=7618, lambda=c(138,140,116,116), m=1, theta=c(0.01886,102.15)) xBoot <- cwtBoot(x, method="parametric", nreps=10000) summary(xBoot)
These data are of class cwt
which allows for simple use
of the plot method to generate plots of the bootstrap simulation:
library(cwtr) x <- cwtEst(N=c(33666,NA), n=7618, lambda=c(138,140,116,116), m=1, theta=c(0.01886,102.15)) xBoot <- cwtBoot(x, method="parametric", nreps=10000) plot(xBoot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.