handleFlags {oce} | R Documentation

## 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.

### 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.

### Value

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

### Examples

    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)

[Package oce version 0.9-18 Index]