Add columns to landings from corresponding logbook entries.
Usage
addLogbookColumns(
landings,
logbooks,
logbookColumns,
tripIdCol = "tripid",
catchIdCol,
speciesColLand = "Art FAO (kode)",
speciesColLog = "FANGSTART_FAO"
)
Arguments
- landings
data.table
containing landings records, and columns identifying the trip and catch ('tripIdCol', 'catchIdCol').- logbooks
data.table
containing logbook records, and columns identifying the trip and catch ('tripIdCol', 'catchIdCol').- logbookColumns
character() vector that identifies columns in logbooks that are to be added to 'landings'
- tripIdCol
character() that identifies the column in 'landings' and 'logbooks' that contain trip ids
- catchIdCol
character() that identifies the column in 'landings' and 'logbooks' that contain catch ids
- speciesColLand
character() that identifies the column in 'landings' that identify species landed
- speciesColLog
character() that identifies the column in 'logbooks' that identify species caught.
Details
'landings' should already imputed with information about individual catches.
The columns 'tripIdCol' and 'catchIdCol' must be set on 'landings' and 'logbooks'. This may be achieved by appendTripIdLogbooks
, appendTripIdLandings
and imputeCatchesLandings
.
'landings' may contain records with no correspond logbook entires ('tripIdCol' contains NAs). The added columns will have NA for these records.
See also
makeTripIds
, appendTripIdLandings
, appendTripIdLogbooks
, and imputeCatchesLandings
for obtaining 'landings' and 'logbooks' with trip-ids and catch-ids.