surveyIndex: Get Survey Biomass Index

Description Usage Arguments Value Author(s) See Also Examples

View source: R/surveyIndex.R

Description

Extract survey biomass index series from aggrVisit dataframe, for a given species, size group, and survey.

Usage

1
surveyIndex(tegund, lengd=NULL, sur="smb", div=1, data=aggrVisit)

Arguments

tegund

species name, like "ufsi".

lengd

minimum length group to include in the biomass index, or NULL to include all lengths.

sur

survey name, either "smb" or "smh".

div

denominator to shorten biomass index.

data

main dataframe, like aggrVisit.

Value

Dataframe with eight columns:

ar

year

bio.staerri

biomass index

cv.bio.staerri

cv

svaedi

area

svaedisnr

area code

lengd

length

tegund

species

sur

survey name

Author(s)

Arni Magnusson.

See Also

[ is used to extract the relevant rows and columns.

hafroAssmt-package gives an overview of the package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
aggrDemo <- data.frame(fj=0, cv.fj=NA,
                       bio.staerri=round(1e5*exp(rnorm(36,sd=0.3)),1),
                       cv.bio.staerri=round(runif(36,0.05,0.5),3),
                       fj.minni=0, cv.fj.minni=NA, fj.haenga=0,
                       cv.fj.haenga=NA, fj.hrygna=0, cv.fj.hrygna=NA,
                       svaedi=c("N","S","Heild"), svaedisnr=13:15,
                       lengd=rep(7:9,each=3), ar=rep(2001:2004,each=9),
                       bio=0, tegund="daemi", sur="smb")
surveyIndex("daemi", data=aggrDemo)
surveyIndex("daemi", data=aggrDemo, div=1e3)

## Typical usage requires aggrVisit:
##
## surveyIndex("ufsi", 55)

hafroAssmt documentation built on May 2, 2019, 5:47 p.m.