Skip to contents

The airdas_dfr class is a subclass of data.frame, created to provide a concise and robust way to ensure that the input to airdas_processadheres to certain requirements. Specifically, objects of class airdas_dfr are data frames with specific column names and classes, as detailed in the 'Properties of airdas_dfr' section. Objects of class airdas_dfr are created by airdas_read or as_airdas_dfr, and are intended to be passed directly to airdas_process.

Subsetting or otherwise altering an object of class airdas_dfr will cause the object to drop its airdas_dfr class attribute, although note that combining two airdas_dfr objects using rbind will return an object with a airdas_dfr class attribute. airdas_process will then try to coerce the object to a airdas_dfr object. It is strongly recommended to pass an object of class airdas_dfr to airdas_process before subsetting, e.g. for events from a certain date range.

Properties of airdas_dfr objects

Objects of class airdas_dfr have a class attribute of c("airdas_dfr", "data.frame"). They must have a column file_type where all values are one of: "turtle", "caretta", "survey", or "phocoena" (case sensitive; see airdas_read for more details). airdas_dfr objects also must not have any NA event codes.

In addition, they must have the following column names and classes:

Column nameColumn class
Event"character"
EffortDot"logical"
DateTimec("POSIXct", "POSIXt")
Lat"numeric"
Lon"numeric"
Data1"character"
Data2"character"
Data3"character"
Data4"character"
Data5"character"
Data6"character"
Data7"character"
EventNum"character"
file_das"character"
line_num"integer"
file_type"character"

See also