Skip to contents

Extracts trip IDs from landings.

Usage

makeTripIds(
  landings,
  vesselIdCol = "Radiokallesignal (seddel)",
  lastCatchCol = "Siste fangstdato"
)

Arguments

landings

data.table containing landings records

vesselIdCol

character() that identifies a column in 'landings' that contain the vessel id (e.g. radio call signal) of the landing vessel. Default compatible with readLssFile.

lastCatchCol

character() that identifies a Date column in 'landings' that contain the date of last catch for each record. Default compatible with readLssFile.

Value

data.table with columns 'vesselId', 'time' (POSIXct with time zone as in 'landings') and 'tripId'

Examples

 if (FALSE) {
   #make trip ids for landings
   lssfile <- "" #set appropriately
   landings <- RstoxData::readLssFile(lssfile)
   tripIds <- makeTripIds(landings)
 }