listsToObs {XML2R}R Documentation

Flatten nested list into a list of observations

Description

This function flattens the nested list into a list of "observations" (that is, a list of matrices with one row). The names of the list that is returned reflects the XML ancestory of each observation.

Usage

listsToObs(l, urls, append.value = TRUE, as.equiv = TRUE, url.map = TRUE)

Arguments

l

list. Should be the output from nodesToList.

urls

character vector the same length as l. Each element should map element of l to an XML file.

append.value

logical. Should the XML value be appended to the observation?

as.equiv

logical. Should observations from two different files (but the same ancestory) have the same name returned?

url.map

logical. If TRUE, the 'url_key' column will contain a condensed url identifier (for each observation) and full urls will be stored in the "url_map" element. If FALSE, the full urls are included (for each observation) as a 'url' column and no "url_map" is included.

Value

A list where each element reflects one "observation".


[Package XML2R version 0.0.8 Index]