WFS_util_replace_names: Replace names in a list

View source: R/WFS_utils.R

WFS_util_replace_namesR Documentation

Replace names in a list

Description

This function uses two character vectors to replace names in a named list. The first character vector contains the names (case insensitive) that will be replaced and the second character vector contains their corresponding replacements. It is possible that all, none or some names will be replaced.

Usage

WFS_util_replace_names(mylist, onames, nnames)

Arguments

mylist

A named list

onames

Character vector with names to be replaced (case insensitive)

nnames

Character vector with corresponding replacements

Details

In this package the function is used to translate argument names for the case that these names are different in the WFS versions.

Value

A copy of mylist with names in onames replaced by the corresponding ones in nnames

See Also

WFS_util_unify_names() , WFS_util_v12_names()

Examples

## Not run: 
WFS_util_replace_names(mylist,
  c('maxFeatures', 'typeName'),
  c('count',       'typeNames') )

## End(Not run)

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