Skip to contents

This function changes specified entries in the data-quality flags of glider objects. Those flags are stored within a list named flags$payload1 that resides in the metadata slot.

Usage

setGliderFlags(
  object,
  name = NULL,
  i = NULL,
  value = NULL,
  debug = getOption("gliderDebug", 0)
)

Arguments

object

A glider object, i.e. an object inheriting from glider-class.

name

Character string indicating the name of the variable to be flagged. If this variable is not contained in the object's data slot, an error is reported.

i

There are three choices for i. First, if i=="all", then any existing flags for the named item are discarded, and replaced with the new value. Second, if i is a vector of integers, then flags are set to value at indices given by i. Third, if it is a logical vector of the same length as the data, then just those indices that match TRUE values in i are set to value.

value

The value to be inserted in the flag.

debug

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

Value

An object with flags set as indicated.

See also

See handleGliderFlags() for an example of use.

Other functions relating to data-quality flags: handleGliderFlags()

Author

Dan Kelley