## ----eval=FALSE, echo=FALSE----------------------------------------------
# # Run the following to properly build for inclusion in package
# library(devtools)
# devtools::build_vignettes()
## ----echo=FALSE, results="hide"------------------------------------------
library(captioner)
tbls <- captioner::captioner(prefix="Table")
tbls(name="LRIBI_Table1.png","Metrics used in the Wisconsin large-river index of biotic integrity (IBI). Species designations for each category may be seen by typing `LRIBI_AppendixA` in R. This is modified from Table 1 in Lyons *et al.* (2001).")
tbls(name="LRIBI_Table3.png","Metrics and scoring criteria for the Wisconsin large-river index of biotic integrity (IBI). This is Table 3 in Lyons *et al.* (2001).")
## ----setup, echo=FALSE, results="hide"-----------------------------------
library(knitr)
opts_chunk$set(fig.width=5,fig.height=5,out.width='300pix',prompt=TRUE,comment="")
## ------------------------------------------------------------------------
library(fishWiDNR)
## ----echo=FALSE, results="hide", message=FALSE, warning=FALSE------------
# -----------------------------------------------------------------------------
# This code is hidden from the user and is needed to make this compile from
# the fishWiDNR package directory
dir <- dirname(system.file("extdata","aggdata_Survey375049456.csv",package="fishWiDNR"))
fmdb.df <- read.FMDB(paste0(dir,"/fish_raw_data_Survey375049456.csv"),expandCounts=TRUE)
agg.df <- read.csv(paste0(dir,"/aggdata_Survey375049456.csv"))
# -----------------------------------------------------------------------------
## ----echo=3, eval=FALSE--------------------------------------------------
# # -----------------------------------------------------------------------------
# # Only one of the following two setwd()s is required. See vignette text.
# setwd("C:/IBI/Data/WolfRiver")
## ----eval=FALSE----------------------------------------------------------
# setwd(choose.dir())
## ----eval=FALSE----------------------------------------------------------
# fmdb.df <- read.FMDB("fish_raw_data_Survey375049456.csv",expandCounts=TRUE)
# agg.df <- read.csv("aggdata_Survey375049456.csv")
## ------------------------------------------------------------------------
res <- LRIBI(fmdb.df,agg.df,effort=0.9)
## ------------------------------------------------------------------------
coef(res)
## ------------------------------------------------------------------------
summary(res)
## ----fig.height=5,fig.width=5,out.width="600pix"-------------------------
plot(res)
## ----out.width="400pix"--------------------------------------------------
plot(res,type="ratings")
## ----fig.show="hold", out.width="400pix"---------------------------------
plot(res,type="counts",xlim=c(0,80))
plot(res,type="biomass",xlim=c(0,25))
## ------------------------------------------------------------------------
problemsLRIBI(res)
## ----echo=FALSE, results="hide", message=FALSE---------------------------
# -----------------------------------------------------------------------------
# This code is hidden from the user and is needed to make this compile from
# the fishWiDNR package directory
dir <- dirname(system.file("extdata","aggdata_Survey375334018.csv",package="fishWiDNR"))
fmdb.dfB <- read.FMDB(paste0(dir,"/fish_raw_data_Survey375334018.csv"),expandCounts=TRUE)
agg.dfB <- read.csv(paste0(dir,"/aggdata_Survey375334018.csv"))
# -----------------------------------------------------------------------------
## ----eval=FALSE, warning=TRUE--------------------------------------------
# fmdb.dfB <- read.FMDB("fish_raw_data_Survey375334018.csv",expandCounts=TRUE)
# agg.dfB <- read.csv("aggdata_Survey375334018.csv")
## ------------------------------------------------------------------------
res <- LRIBI(fmdb.dfB,agg.dfB,effort=0.9)
coef(res)
## ------------------------------------------------------------------------
problemsLRIBI(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.