airdas_read: Read AirDAS file(s)

View source: R/airdas_read.R

airdas_readR Documentation

Read AirDAS file(s)

Description

Read one or more fixed-width aerial survey DAS text file(s) generated by TURTLEP, or another AirDAS program, into a data frame, where each line is data for a specific event

Usage

airdas_read(
  file,
  file.type = c("turtle", "caretta", "survey", "phocoena"),
  skip = 0,
  tz = "UTC",
  ...
)

Arguments

file

filename(s) of one or more AirDAS files

file.type

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

skip

integer: see read_fwf. Default is 0

tz

character; see strptime. Default is UTC

...

ignored

Details

Reads/parses aerial survey DAS data into columns of a data frame. If file contains multiple filenames, then the individual data frames will be combined using rbind

See airdas_format_pdf for information about AirDAS format requirements for the specific file types (programs)

Value

An airdas_dfr object, which is also a data frame, with AirDAS data read into columns. The data are read into the data frame as characters, with the following exceptions:

Name Class Details
EffortDot logical TRUE if "." was present, and FALSE otherwise
DateTime POSIXct combination of 'Date' and 'Time' columns, with time zone tz
Lat numeric 'Latitude' columns converted to decimal degrees in range [-90, 90]
Lon numeric 'Longitude' columns converted to decimal degrees in range [-180, 180]
Data# character leading/trailing whitespace trimmed for non-comment events (i.e. where 'Event' is not "C" )
file_das character base filename, extracted from the file argument
line_num integer line number of each data row
file_type character file.type argument

Examples

y <- system.file("airdas_sample.das", package = "swfscAirDAS")
airdas_read(y, file.type = "turtle")


swfscAirDAS documentation built on Aug. 9, 2023, 1:06 a.m.