R: Suggest a default flag for good data

defaultFlags {oce} | R Documentation

## Suggest a default flag for good data

### Description

`defaultFlag` tries to suggest a reasonable default `flag` scheme for use by `handleFlags`. It does this by looking for an item named `flagScheme` in the `metdata` slot of `object`. If that is found, and if the scheme is recognized, then a numeric vector is returned that indicates bad or questionable data. The recognized schemes, and their defaults are as below; note that this is a very conservative setup, retaining only data that are flagged as being good, while discarding not just data that are marked as bad, but also data that are marked as questionable.

- for `argo`, the default is `flag=c(0, 2:9)`, i.e. retain only data flagged as 'passed_all_tests'

- for `BODC`, the default is `flag=c(0, 2:9)`, i.e. retain only data flagged as 'good'

- for `DFO`, the default is `flag=c(0, 2:9)`, i.e. retain only data flagged as 'appears_correct'

- for `WHP bottle`, the default is `flag=c(1, 3:9)`, i.e. retain only data flagged as 'no_problems_noted'

- for `WHP ctd`, the default is `flag=c(1, 3:9)`, i.e. retain only data flagged as 'acceptable'

### Usage

    defaultFlags(object)

### Arguments

`object` | An oce object

### Value

A vector of one or more flag values, or `NULL` if `object` `metadata` slot lacks a `flagScheme` (as set by `initializeFlagScheme`), or if it has a scheme that is not in the list provide in “Description”.

### See Also

Other functions relating to data-quality flags: `handleFlags,adp-method`, `handleFlags,argo-method`, `handleFlags,ctd-method`, `handleFlags,section-method`, `handleFlags`, `initializeFlagScheme,ctd-method`, `initializeFlagScheme,oce-method`, `initializeFlagScheme,section-method`, `initializeFlagScheme`, `initializeFlags,adp-method`, `initializeFlags,oce-method`, `initializeFlags`, `setFlags,adp-method`, `setFlags,ctd-method`, `setFlags,oce-method`, `setFlags`

[Package oce version 1.0-1 Index]