handleFlags,oce-method | R Documentation |
Data-quality flags are stored in the metadata
slot of oce objects in a
list named flags
.
The present function (a generic that has specialized versions
for various data classes) provides a way to
manipulate the contents of the data
slot, based on
such data-quality flags. For example, a common operation is to replace
erroneous data with NA
.
If the flags
within object
's metadata
slot is empty,
then object
is returned, unaltered.
Otherwise, handleFlags
examines object@metadata$flags
in the context of the flags
argument, and then
carries out actions that are specified by the actions
argument.
By default, this sets the returned data
entries to NA
,
wherever the corresponding metadata$flag
values
signal unreliable data. To maintain a hint as to why
data
were changed, metadata$flags
in the
returned value is a direct copy of the corresponding
entry in object
.
## S4 method for signature 'oce'
handleFlags(
object = "oce",
flags = NULL,
actions = NULL,
where = NULL,
debug = getOption("oceDebug")
)
object |
an oce object. |
flags |
A list specifying flag values upon which actions will be taken. This can take two forms.
If |
actions |
an optional list that contains items with
names that match those in the |
where |
an optional character value that permits the function to work with
objects that store flags in e.g. |
debug |
An optional integer specifying the degree of debugging, with
value 0 meaning to skip debugging and 1 or higher meaning to print some
information about the arguments and the data. It is usually a good idea to set
this to 1 for initial work with a dataset, to see which flags are being
handled for each data item. If not supplied, this defaults to the value of
|
Base-level handling of flags.
Other functions relating to data-quality flags:
defaultFlags()
,
handleFlags()
,
handleFlags,adp-method
,
handleFlags,argo-method
,
handleFlags,ctd-method
,
handleFlags,section-method
,
initializeFlagScheme()
,
initializeFlagScheme,ctd-method
,
initializeFlagScheme,oce-method
,
initializeFlagScheme,section-method
,
initializeFlagSchemeInternal()
,
initializeFlags()
,
initializeFlags,adp-method
,
initializeFlags,oce-method
,
initializeFlagsInternal()
,
setFlags()
,
setFlags,adp-method
,
setFlags,ctd-method
,
setFlags,oce-method
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.