WFS_util_unify_names: Replace argument names by their uniform counterparts

WFS_util_unify_namesR Documentation

Replace argument names by their uniform counterparts

Description

Argument names in WFS versions 1.1.0 and 2.0.0 are not always the same (see WFS_util_v12_names()) . To enable the use of both sets of names (independent of the version used) in queries these names are first translated to their uniform counterparts. Before constructing the actual query these uniform names will be translated again (by WFS_util_replace_names() ) to their version dependent counterpart. In normal use the vnames argument will be the output of WFS_util_v12_names(). The look-up of the names is done while ignoring case.

Usage

WFS_util_unify_names(mylist, vnames)

Arguments

mylist

A named list

vnames

A list of three character vectors:

  • uniform names

  • first set of names

  • second set of names

Value

A copy of mylist with names in both sets replaced by the corresponding uniform one

See Also

WFS_util_v12_names() , WFS_util_replace_names()

Examples

L <- list( a = 1, A = 2, aA = 3, Aa = 4,
          b = 6, B = 7, bB = 8, Bb = 9)
vnames <- list( c('X','Y'), c('a', 'aa'), c('b', 'bb'))
WFS_util_unify_names(L,vnames)
# list(X = 1, X = 2, Y = 3, Y = 4, X = 6, X = 7, Y = 8, Y = 9)

HanOostdijk/HOQCwfs documentation built on March 6, 2023, 8:18 a.m.