re_name: Rename rows of a list

Description Usage Arguments Value

View source: R/utils.R


Sometimes, certain nodes in an XML ancestory may want to be neglected before any keys are created (see add_key) or observations are aggregated (see collapse). This function takes a list of "observations" (that is, a list of matrices with one row) and alters the names of that list. Note that any information lost from changing names is saved in a new column whose name is specified by


re_name(obs, namez, equiv, = "diff_name",,
  quiet = FALSE)



list. Should be the output from XML2Obs (or listsToObs).


must be equivalent to names(obs). Intended use is to avoid unneccessarily repeating that operation.


character vector with the appropriate (unique) names that should be regarded "equivalent".

character string used for naming the variable that is appended to any observations whose name was overwritten. The value for this variable is the difference in from the original name and the overwritten name.

character string to override naming of observations that are renamed.


logical. Include message about how observations are being renamed?


A list of "observations".

XML2R documentation built on May 30, 2017, 6:27 a.m.

Search within the XML2R package
Search all R packages, documentation and source code