makeTripIds: Make trip IDs

View source: R/landingsAnalyses.R

makeTripIdsR Documentation

Make trip IDs

Description

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

 ## Not run: 
   #make trip ids for landings
   lssfile <- "" #set appropriately
   landings <- RstoxData::readLssFile(lssfile)
   tripIds <- makeTripIds(landings)
 
## End(Not run)

StoXProject/RstoxFDA documentation built on Nov. 12, 2024, 3:42 a.m.