Description Usage Arguments Details Value References See Also
This function imports data from path/data/lenwgt adds column
YEAR
, and attaches labels for the spatial scales of interest (shelf,
ESS/WSS, NAFO divisions, and/or strata) in column ID
.
1 2 | LWdataframe(path, s.year, e.year, areas = c("shelf", "esswss", "nafo",
"strat"), update_LW = FALSE, csv = TRUE, rdata = TRUE)
|
path |
The filepath to the data folder created by |
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 |
update_LW |
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_LW = TRUE
, user must define channel =
odbcConnect("ptran", uid = ###, pwd = ###)
in the global environment. This
channel must have access to the gsinf and gsdet tables from the groundfish database.
This function creates a directory path/output/LengthWeight and stores
the length-weight dataframe for each area in area_LengthWeight.RData (object
name is lw
) and/or area_LengthWeight.csv. The dataframe has 5
columns: ID
, YEAR
, SPECIES
, LENGTH
(cm), and
WEIGHT
(g). These files are formatted for the marindicators
package.
Original code by DD.
Other LW functions: extractLW
,
plot_LW
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.