knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "90%"
)

cwtr

Project Status: WIP – Initial development is in progress, but there
     has not yet been a stable, usable release suitable for the
     public.

This R package allows for simple calculation of CWT estimates and bootstrap intervals for tag recovery and sampling in fisheries.


Installation

You can install the development version of cwtr from GitHub with:

# install.packages("remotes")
remotes::install_github("justinpriest/cwtr", build_vignettes = TRUE)


Example Usage

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) 


justinpriest/cwtr documentation built on April 22, 2022, 12:51 a.m.