getSeason: Add a column to 'Pdata' for season.

Description Usage Arguments Details Value Author(s)

View source: R/getSeason.R

Description

Workflow

Most assessments won't require getSeason. It is run by cleanPacFIN and users shouldn't need to worry about it. If a specialized season structure is required, getSeason should be run immediately after cleanPacFIN

Usage

1
2
getSeason(Pdata, season_type = -1, yearUp = NULL, yearDown = NULL,
  plotResults = F, verbose = TRUE)

Arguments

Pdata

A PacFIN data.frame

season_type

Specify a numeric value for season type. If negative then all months will be assigned to season 1. If 0 then seasons will be assinged from Pdata$SAMPLE_MONTH, where each month is a unique season. If 1 then seasons are assigned according to methods used for Petrale, where winter months (c(11:12, 1:2)) are season 1 and the remaining months (summer) are assigned to season 2. Please contact the function author if you wish to include an additional seasonal scheme.

yearUp

Used to provide a list of months (i.e., 1:12) for which to adjust the year (Pdata$fishyr) up. For example, if winter months belong to the following year then use yearUp = 11:12.

yearDown

Used to provide a list of months (i.e., 1:12) for which to adjust the year (Pdata$fishyr) down. For example, if winter months belong to the previous year then use yearUp = 1:2.

plotResults

A logical value specifying if plots should or should not be created and shown in the console.

verbose

A logical value specifying if output should be written to the screen or not. Good for testing and exploring your data but can be turned off when output indicates errors. The default value is TRUE.

Details

Several seasonal schemes are available, including the Petrale seasons (1 = winter months, 2 else). Contact the function author for more schemes if needed.

Value

An additional column season is added to Pdata. No columns are modified.

Author(s)

Andi Stephens


nwfsc-assess/PacFIN.Utilities documentation built on June 30, 2017, 8:49 a.m.