psu_total: PSU Total

View source: R/psu_total.R

psu_totalR Documentation

PSU Total

Description

Give the number of total psu for a given year.

Usage

psu_total(
  dataframe,
  reported_year = NULL,
  selected_country = NULL,
  selected_ocean = NULL,
  selected_harbour = NULL,
  selected_variable = "trip"
)

Arguments

dataframe

data.frame expected. 'Csv' or 'output' of the function data_extraction, which must be done before using the psu_total() function.

reported_year

integer expected. Write the wanted year of the report.

selected_country

integer expected. Country code to select the list of boat to count. If NULL give all the vessel for the given year.

selected_ocean

integer expected. Ocean code to select the list of boat to count. If NULL give all the vessel for the given year, works only for 'data_type' == 'observe'

selected_harbour

integer expected. Harbour code to select the list of boat to count. If NULL give all the vessel for the given year, works only for 'data_type' == 'observe'

selected_variable

character expected. Write the variable of the PSU. Can be 'trip', 'vessel' or 'well'. 'trip' by default.

Details

The input dataframe frome sql must contain all these columns for the function to work [see referentials]:

  • program

  • ocean_label

  • fleet

  • vessel_label

  • vessel_type_code

  • landing_date

  • country_code

  • vessel_well_number

  • arrival

  • port_arrival

   program                          | ocean_label | fleet | vessel_label | vessel_type_code | landing_date | country_code | vessel_well_number | arrival   | port_arrival
   -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
   AVDTH Atlantique 1999-2022 (IRD) | Atlantic    | FRA   | VIA AVENIR   | 6                | 2021-01-15   | 1            | 4T                 | 2021-01-1 | ABIDJAN
   AVDTH Atlantique 1999-2022 (IRD) | Atlantic    | FRA   | VIA AVENIR   | 6                | 2021-01-15   | 1            | 4T                 | 2021-01-1 | ABIDJAN
   AVDTH Atlantique 1999-2022 (IRD) | Atlantic    | FRA   | VIA AVENIR   | 6                | 2021-01-15   | 1            | 4T                 | 2021-01-1 | ABIDJAN

Value

The function return a table.


OB7-IRD/fishi documentation built on Feb. 4, 2025, 2:03 a.m.