Skip to contents

The airdas_df class is a subclass of data.frame, created to provide a concise and robust way to ensure that the input to downstream AirDAS processing functions, such as airdas_sight, adheres to certain requirements. Specifically, objects of class airdas_df are data frames with specific column names and classes, as detailed in the 'Properties of airdas_df' section. In addition, airdas_df objects have no NA values in the 'Lat' 'Lon', or 'DateTime' columns. Objects of class airdas_df are created by airdas_process or as_airdas_df, and are intended to be passed directly to DAS processing functions such as airdas_sight.

Subsetting, say for a specific date or transect number, or otherwise altering an object of class airdas_df will cause the object to drop its airdas_df class attribute, although note that combining two airdas_df objects using rbind will return an object with a airdas_df class attribute. If this object is then passed to a DAS processing function such as airdas_sight, the function will try to coerce the object to a airdas_df object.

Properties of airdas_df objects

Objects of class airdas_df have a class attribute of c("airdas_df", "data.frame"). All values in the OnEffort column must be TRUE or FALSE (no NA values). All on effort events must have non-NA Lat/Lon/DateTime values, and there must be no events with a "#" event code (deleted event). Like airdas_dfr events, there must be a file_type column where all values are one of: "turtle", "caretta", "survey", or "phocoena" (case sensitive; see airdas_read for more details about file types).

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

Column nameColumn class
Event"character"
DateTimec("POSIXct", "POSIXt")
Lat"numeric"
Lon"numeric"
OnEffort"logical"
Trans"character"
Bft"numeric"
CCover"numeric"
Jelly"numeric"
HorizSun"numeric"
VertSun"numeric"
HKR"character"
Haze"logical"
Kelp"logical"
Red tide"logical"
AltFt"numeric"
SpKnot"numeric"
ObsL"character"
ObsB"character"
ObsR"character"
Rec"character"
VLI"character"
VLO"character"
VB"character"
VRI"character"
VRO"character"
Data1"character"
Data2"character"
Data3"character"
Data4"character"
Data5"character"
Data6"character"
Data7"character"
EffortDot"logical"
EventNum"character"
file_das"character"
line_num"integer"
file_type"character"

See also