Creates haul midpoint latitude and longitude variables
Source:R/create_variables.R
create_mid_haul.Rd
Calculates latitude and longitude of the haul midpoint and adds two variables to the primary data set: the midpoint latitude and the midpoint longitude.
Arguments
- dat
Primary data containing information on hauls or trips. Table in the FishSET database contains the string 'MainDataTable'.
- project
Project name.
- start
Character string, variables in
dat
defining the longitude and latitude of the starting location of haul. Must be in decimal degrees.- end
Character string, variables in
dat
defining the longitude and latitude of the ending location of haul. Must be in decimal degrees.- name
String, name of new variable. Defaults to `mid_haul`.
Value
Returns primary dataset with two new variables added: latitude and longitude of haul midpoint.