bsmData: Import Data for BSM

Description Usage Arguments Details Value Methods (by generic) Author(s)

Description

This function handles manipulation of a provided data set (in the form of a data frame, from read.csv or similar) to a form that can be used by other bsmData functions.

Usage

1
2
3
4
5
bsmData(y1, y2, n, length, length.unit = NULL, haul, q1, q2, paired = FALSE,
  data = NULL, ...)

## S3 method for class 'bsmdata'
print(x, ...)

Arguments

y1

the count for the codend or experimental trawl

y2

the count fo the cover or control trawl

n

the total fish caught in the trawl

length

the length of fish

length.unit

the unit of length measurements

haul

the haul id

q1

sampling fraction for codend/experimental trawl

q2

sampling fraction for cover/experimental trawl

paired

logical, is the data from a paired trawl?

data

the name of the data frame. If NULL, then the other supplied argument must be vectors. Otherwise if df is supplied, then the other arguments are the variable names.

...

additional variables can be passed to the object, such as weights, mesh sizes, and any other covariates to be used in later modelling

x

a bsmData object

Details

The simplest use is where a data frame is provided, and the required column names are specified as function arguments.

It is also possible to supply vectors and no data frame.

Value

An object of class bsmdf. This is a list with necessary information, and is what should be supplied as the data argument to other bsmData functions.

Methods (by generic)

Author(s)

Tom Elliott


tmelliott/bsm documentation built on May 31, 2019, 4:38 p.m.