exclude_unavailable | R Documentation |
This function screens vector of FVCOM file names in a dataframe and removes any rows which refer to FVCOM files that are unavailable in a specified directory. This is an important check prior to loading multiple FVCOM files into R.
exclude_unavailable(dat, dir2load, ...)
dat |
A dataframe (e.g. containing information necessary to extract FVCOM outputs). The only requirement is an integer column named 'date_name' which contains the 6 digit code of FVCOM file names (see |
dir2load |
A string which defines the directory from which FVCOM files are loaded. The function identifies all files in this directory (with necessary properties, see |
... |
Additional arguments passed to |
A dataframe, as inputted, but in which any rows which refer to the names of unavailable FVCOM files have been excluded. If rows have been excluded, the function returns a warning.
Edward Lavender
This check is implemented by extract
.
## Not run: path <- system.file("WeStCOMS_files/tidal_elevation", package = "fvcom.tbx", mustWork = TRUE) exclude_unavailable(data.frame(date_name = c(160301, 160302, 160303)), path) exclude_unavailable(data.frame(date_name = c(160301, 160302, 160303), depth = c(60, 65, 90)), path) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.