isDefined: Check if an element is defined

View source: R/checks.R

isDefinedR Documentation

Check if an element is defined

Description

This function checks the value returned from an mdqe xpath selector.

Usage

isDefined(variableName, variable = NA, pos = as.integer(1))

Arguments

variableName

The name of the variable that contains selected values.

variable

The variable that contains selected values.

pos

The list element to check.

Details

This check can be used to test values from a selector that uses a subSelector. The value returned from this type of selector is a list that could possibly contain elements that have no defined value, i.e. the subSelector will return NA if the xpath it is trying to select is not present. The 'pos' argument can be used to check a specific value of such a list.

Value

logical


NCEAS/metadig-r documentation built on June 17, 2022, 5:09 a.m.