Description Usage Arguments Details Examples
View source: R/clean_datras_data.R
This function cleans up datras data uploaded into R, for example using the get_datras_data function.
DATRAS data is typically messy and gathers information collected using different sampling
protocols (gear type for instance). Analysing data across surveys without this cleaning step
is therefore unadvisable. clean_data_datras
runs a basic clean
of the uploaded data (see Details).
1 | clean_datras_data(survey, beam = F)
|
survey |
is an R data.frame |
beam |
is a boolean argument. Default value is FALSE. If TRUE, the data comes from a beam trawl survey, rather than from the Internation Bottom Trawl Survey (IBTS). |
The majority of surveys on DATRAS are IBTS surveys. There are consistent in sampling protocol from 1980 onwards. Among the other surveys only the English Beam Trawl survey have a consistent sampling protocol through time and other sources of information are excluded. Other cleaning rules include: gear consistency (GOV if IBTS survey or 4-meter beam trawl if English Trawl survey); haul validity; haul duration (hauls are normally 30 minutes long but can vary, we exclude overly short or long hauls).
1 2 3 4 5 6 | data(datras_surveys)
mysurvey <- datras_surveys$survey[1]
myear <- datras_surveys$year[1]
myquarter <- datras_surveys$quarter[1]
mysurvey <- get_datras_data("HH", mysurvey, myear, myquarter)
mycleansurvey <- clean_datras_data(mysurvey, beam = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.