exclude_corrupt: Exclude any rows in a dataframe associated with corrupt FVCOM...

View source: R/excludes.R

exclude_corruptR Documentation

Exclude any rows in a dataframe associated with corrupt FVCOM files

Description

This function screens vector of FVCOM file names in a dataframe and removes any rows which refer to the names of known corrupt files (as defined by the user). This is an important check prior to loading multiple FVCOM files into R.

Usage

exclude_corrupt(dat, corrupt = NULL)

Arguments

dat

A dataframe (e.g. containing information necessary to extract FVCOM predictions). The only requirement is an integer column named 'date_name' which contains the 6 digit code of FVCOM file names (see date_name).

corrupt

A vector of integers which define the 6 digit code of any corrupt FVCOM files.

Value

A dataframe, as inputted, but in which any rows associated with corrupt FVCOM files have been excluded. If rows have been excluded, the function returns a warning.

Author(s)

Edward Lavender

See Also

This check is implemented by extract.

Examples


## Not run: 
exclude_corrupt(data.frame(date_name = c(160301, 160302, 160303)), 160301)

## End(Not run)


edwardlavender/fvcom.tbx documentation built on Nov. 26, 2022, 10:28 p.m.