subsetDatras | R Documentation |
Selects species, gear, years, haul duration from DATRAS object and returns it or save it in an RDS file
subsetDatras(dat, species = "Gadus morhua", gear = NULL, years = c(1991,
2014), haulDur = NULL, icesAreas = NULL, out = NULL)
dat |
DATRAS object, or character containing the filename of an RDS file holding a DATRASraw object |
species |
character vector, species to keep (latin name). If |
gear |
character vector, gears to keep. If |
years |
numeric vector, if length is 2 it is the first and last year to keep, if length is 1 only the data of this year are kept. If |
haulDur |
numeric vector of length 2 with the minimum and maxumum haul duration. If |
icesAreas |
character vector, the ICES area codes to keep. If |
out |
string, filename of the output RDS file |
if out
is NULL, a DATRASraw object (invisible). If out
is character, the filename of the saved RDS file. If the file specified in out
exist, the function does not rewrite the file and returns the filename.
alko
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.