View source: R/landingsAnalyses.R
appendTripIdLandings | R Documentation |
Assigns trip IDs to landings based on vessel identifier and date of last catch.
appendTripIdLandings(
landings,
tripIds = NULL,
vesselIdCol = "Radiokallesignal (seddel)",
lastCatchCol = "Siste fangstdato",
tripIdCol = "tripid"
)
landings |
|
tripIds |
|
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 |
lastCatchCol |
character() that identifies a POSIXct column in 'landings' that contain the time of last catch for each record. Default compatible with |
tripIdCol |
character() that identifies the column name to append to 'landings' |
if 'tripIds' is NULL, trip IDs will be constructed from landings using makeTripIds
data.table
with columns 'vesselId' and 'time'
## Not run:
#merge mesh size from first operation on a trip into landings
lssfile <- "" #set appropriately
logbfile <- "" #set appropriately
landings <- RstoxData::readLssFile(lssfile)
logbooks <- RstoxData::readErsFile(logbfile)
tripIds <- makeTripIds(landings)
logbooksWtripIds <- appendTripIdLogbooks(logbooks, tripIds)
landingsWtripIds <- appendTripIdLandings(landings, tripIds)
firstCatch <- logbooksWtripIds[!duplicated(logbooksWtripIds$tripid),]
landingsWmeshSize <- merge(landingsWtripIds,
firstCatch[,c("tripid", "MASKEVIDDE")],
by="tripid",
all.x=T)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.