calc_days_at_sea_trip: Calculate days at sea for a fishing trip.

Description Usage Arguments Details Value See Also Examples

View source: R/calc_effort.R

Description

Calculate days at sea for a single fishing trip using data in the format described in the package vignette checking_data.

Usage

1

Arguments

trip

Data.frame of the trip data

Details

The input is a single fishing trip. The format of the data should be checked by check_format before calling this function (see the package vignette checking_data for more details). Days at sea is reported at the gear (type and mesh size), fishing area and economic zone level. The total number of days at sea is the number of commenced 24 hour periods. The total number of days at sea of a trip is split equally over dates on which fishing occurs. The effort for each fishing date is split equally over the fishing activity on that date. Active and passive gears are treated equally. See the vignette calculating_fishing_effort for more details. This function is called by calc_fishing_effort.

Value

A data.frame with the days at sea by gear, fishing area and economic zone.

See Also

See calc_fishing_effort. See the package vignette checking_data for data preparation and the vignette calculating_fishing_effort for the calculation details.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
trip1 <- data.frame(
   eunr_id = "my_boat", loa = 2000, gt = 70, kw = 400,
   trip_id = "trip1",
   # 4 day trip
   depdate = "20140718", deptime = "0615", retdate = "20140721", rettime = "1615",
   # Only fish on 2 of those
   fishdate = c("20140719", "20140719", "20140719", "20140719", "20140720",
       "20140720", "20140720"), 
   gear = c("OTB","OTB","OTB","GN","OTB","GN","FPO"), gear_mesh_size = c(80,80,80,50,80,50,0),
   fishing_area = "27.4.B",
   economic_zone = "EU",
   rectangle = c("39F0","40F0","41F0","41F0","41F0","41F0","41F0"),
   stringsAsFactors = FALSE
)
das <- calc_days_at_sea_trip(trip1)

Example output



fecR documentation built on Sept. 9, 2017, 5:03 p.m.