Learn R Programming

oce (version 0.9-18)

handleFlags: Set any flagged data to NA

Description

If this is applied to a non-oce object, then that object is returned unchanged. If it is applied to an object that lacks metadata$flags, then x is again returned unchanged, but a warning is issued.

Usage

handleFlags(x, action = "NA")

Arguments

x
An oce object.
action
The action to be undertaken.

Value

  • Either a non-oce object returned as-is, or an oce object that may have been modified to account for flags.

Details

If action is "NA", then any flagged data are set to NA. Any other action yields an error.

Note that this only works for objects of argo-class, so far.

Examples

Run this code
data(argo)
par(mfcol=c(2, 2))
plot(argo, which=2)
plot(handleFlags(argo), which=2)
plot(argo, which=3)
plot(handleFlags(argo), which=3)

Run the code above in your browser using DataLab