initializeFlagsInternal: Create and Initialize oce Flags

View source: R/AllClass.R

initializeFlagsInternalR Documentation

Create and Initialize oce Flags

Description

This function creates an item for a named variable within the flags entry in the object's metadata slot. The purpose is both to document a flag scheme and to make it so that initializeFlags() and setFlags() can specify flags by name, in addition to number. A generic function, it is specialized for some classes via interpretation of the scheme argument (see “Details”, for those object classes that have such specializations).

Usage

initializeFlagsInternal(
  object,
  name = NULL,
  value = NULL,
  debug = getOption("oceDebug")
)

Arguments

object

An oce object.

name

Character value indicating the name of a variable within the data slot of object.

value

Numerical or character value to be stored in the newly-created entry within flags. (A character value will only work if initializeFlags() has been used first on object.)

debug

Integer set to 0 for quiet action or to 1 for some debugging.

Details

If object already contains a flags entry with the indicated name, then it is returned unaltered, and a warning is issued.

Value

An object with the flags item within the metadata slot set up as indicated.

See Also

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


oce documentation built on Sept. 11, 2024, 7:09 p.m.