Learn R Programming

swfscAirDAS (version 0.3.1)

airdas_read: 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",
  ...
)

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:

NameClassDetails
EffortDotlogicalTRUE if "." was present, and FALSE otherwise
DateTimePOSIXctcombination of 'Date' and 'Time' columns, with time zone tz
Latnumeric'Latitude' columns converted to decimal degrees in range [-90, 90]
Lonnumeric'Longitude' columns converted to decimal degrees in range [-180, 180]
Data#characterleading/trailing whitespace trimmed for non-comment events (i.e. where 'Event' is not "C" )
file_dascharacterbase filename, extracted from the file argument
line_numintegerline number of each data row
file_typecharacterfile.type argument

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)

Examples

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

Run the code above in your browser using DataLab