cleanAges: Filter samples for appropriate ages and agemethods.

Description Usage Arguments Details Value Author(s) See Also

View source: R/cleanAges.R

Description

cleanAges removes the samples with bad ages or agemethods.

Usage

1
2
cleanAges(Pdata, keep_age_methods = c("B", "S", ""), minAge = 1,
  maxAge = NULL, CLEAN = TRUE)

Arguments

Pdata

A PacFIN dataset

keep_age_methods

By default, methods "B","S" and "" are retained.

minAge

Minimum age to retain; default is 1.

maxAge

Maximum age to retain; default (NULL) returns all ages greater than minAge.

CLEAN

Default is TRUE. If FALSE, return the input data unchanged.

Details

Workflow

In most cases, you should run cleanPacFIN before cleanAges. There may be cases where initial exploration of the age data can be better accomplished without it.

Age methods "1" and "2" are equivalent to "B" and "S" respectively, and are reset to those values.

No ages less than one occur in the commercial dataset. Zero ages are equivalent to NA.

Value

The input data filtered for age methods and minimum and maximum ages specified, with added column age. A brief report on filtering is output to the console.

Author(s)

Andi Stephens

See Also

cleanPacFIN, sink


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