Skip to contents

Check that AirDAS file has accepted formatting and values


  file.type = c("turtle", "caretta", "phocoena"),
  skip = 0,
  file.out = NULL, = NULL,
  print.transect = TRUE



filename(s) of one or more AirDAS files


character; indicates the program used to create file. Must be one of: "turtle", "caretta", "survey", or "phocoena" (case sensitive). Default is "turtle". Passed to airdas_read


integer: see read_fwf. Default is 0. Passed to airdas_read


character; filename to which to write the error log. Should be a text or CSV file. Default is NULL

character; filename of .dat file from which to read accepted species codes. If NULL, default (internal) file will be used. Default is NULL


logical; indicates if a table with all the transect numbers in the x should be printed using table. Default is TRUE


A data frame with five columns that list information about errors found in the AirDAS files: the file name, line number, index (row number) from the airdas_read(file) data frame, 'ID' (pre-Data# columns from the DAS file), and description of the issue. This data frame is sorted by the 'Description' column. If there are multiple issues with the same line, the issue descriptions are concatenated together using paste(..., collapse = "; ")

If print.transect is TRUE, then the output of table(x$Data1[x$Event == "T"], useNA = "always"), where x is the output of airdas_read(file, ...)

is printed

If file.out is not NULL, then the error log is also written to the file (e.g., a .txt or .csv file) specified by file.out


The default (internal) file is located at system.file("SpCodesAirDAS.dat", package = "swfscAirDAS").

To see the checks performed by this function, you can access the PDF locally at system.file("AirDAS_check.pdf", package = "swfscAirDAS"), or online at

Checks that are not done by this function that may be of interest:

  • Check for valid fish ball/mola/jelly/crab pot codes

  • Check that datetimes are sequential, meaning they 1) are the same as or 2) come after the previous event


y <- system.file("airdas_sample.das", package = "swfscAirDAS")
if (interactive()) airdas_check(y, print.transect = TRUE)