checkSurveyYearQuarterOK: Check that a survey, year and quarter combination is in the...

View source: R/checkInputs.R

checkSurveyYearQuarterOKR Documentation

Check that a survey, year and quarter combination is in the database

Description

Checks a quarter and/or year and/or survey name against a list of all survey year quarter combinations in the DATRAS database. If the combination is not matched it puts up a message showing the available options.

Usage

checkSurveyYearQuarterOK(
  survey,
  year,
  quarter,
  checksurvey = TRUE,
  checkyear = TRUE
)

Arguments

survey

the survey acronym, e.g. NS-IBTS.

year

the year of the survey, e.g. 2010.

quarter

the quarter of the year the survey took place, i.e. 1, 2, 3 or 4.

checksurvey

logical, should the survey name also be checked.

checkyear

logical, should the year also be checked.

Value

logical.

See Also

checkSurveyOK and checkSurveyYearOK also perform checks against the DATRAS database.

icesDatras-package gives an overview of the package.

Examples

## Not run: 
checkSurveyYearQuarterOK(survey = "ROCKALL", 2015, 3)
checkSurveyYearQuarterOK(survey = "ROCKALL", 2015, 1)
checkSurveyYearQuarterOK(survey = "ROCKALL", 2000, 1)
checkSurveyYearQuarterOK(survey = "NOTALL", 2000, 1)

# be careful of unexpected results with checksurvey and checkyear!
checkSurveyYearQuarterOK(survey = "NOTALL", 2000, 1, checksurvey=FALSE)

## End(Not run)

ices-tools-prod/icesDatras documentation built on March 27, 2024, 11:29 p.m.