Description Usage Arguments Details Value References See Also
This function imports data exported by stratifyBiomass()
,
adds column YEAR
, and binds all years together.
1 2 3 | RVdataframe(path, s.year, e.year, areas = c("shelf", "esswss", "nafo",
"strat"), lengthbased, qadjusted, update_RV = FALSE, csv = TRUE,
rdata = TRUE)
|
path |
The filepath to the /data folder. |
s.year |
Year for which to begin data extraction. |
e.year |
Year for which to end data extraction. |
areas |
Areas (spatial scales) for which to format data. A separate
dataframe will be exported for each area. Options are "shelf", "esswss",
"nafo", "strat", or any combination of the four. Default is |
lengthbased |
Logical parameter indicating whether to return stratified
length-based data ( |
qadjusted |
Logical parameter indicating whether to return q-adjusted
biomass and abundance data ( |
update_RV |
Logical parameter indicating whether to run
|
csv |
Logical value indicating whether to export dataframe as a .csv
file. Default is |
rdata |
Logical value indicating whether to export dataframe as a .RData
file. Default is |
If update_RV = TRUE
, user must define channel =
odbcConnect("ptran", uid = ###, pwd = ###)
in the global environment. This
channel must have access to the gscat, gsdet, gsinf, and gs_lengths tables
from the groundfish database and the nafo_strat table from the mfd_stomach
database.
This function creates a directory path/output/RV/area for each entry
in area
. In each area folder is a csv and/or RData file for the
specified combination of lengthbased
and qadjusted
(object
name RVdata
). These files are formatted for the marindicators
package.
If lengthbased = TRUE
, then RVdata
has 6 columns: YEAR
,
SPECIES
, ID
, LENGTH
(cm), BIOMASS
(kg), and
ABUNDANCE
(numbers).
If lengthbased = FALSE
, then RVdata
has 5 columns:
YEAR
, SPECIES
, ID
, BIOMASS
(kg), and
ABUNDANCE
(numbers).
Original code by DD.
Other RV functions: biomassData
,
extractRV
, qBiomass
,
stratifyBiomass
, vesselCorr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.