year.fn: Subset the data by year

View source: R/Year.R

year.fnR Documentation

Subset the data by year

Description

Subset the data by year

Usage

year.fn(dat, colnm, yrs, nmcol = paste(colnm, "new", sep = ""), subset = F)

Arguments

dat

the dataframe of observations

colnm

unsure how this is different from colnms

yrs

the years as a vector (must have c(yr,yr,etc)). Can be any integer values (i.e., c(2001, 2003:2007,2009,1999))

nmcol

name of additional column to add that indicates the values specified. An NA will be put for values that are not in z.

subset

whether or not to return a dataframe with only rows that meet criteria. Default value FALSE.


nwfsc-assess/nwfscDiscardBootstrap documentation built on July 3, 2023, 11:03 p.m.