flatten_deepest: Transform a list of lists whose final nodes are 'list' into a...

View source: R/flatten_deepest.R

flatten_deepestR Documentation

Transform a list of lists whose final nodes are list into a list of lists with this final nodes as different elements (e.g: character).

Description

flatten_deepest receives a list of lists with final nodes as list and transforms it into a list of lists with final nodes as different elements, for example, as character class; keeping the names and attributes' structure.

Usage

flatten_deepest(list)

Arguments

list

A list of lists which must be named.

Details

Return a list of lists with final nodes as different classes (character, integer, ...) keeping the original names' structure.

Examples

rootPath <- system.file(package = "simutils")
xmlFile <- file.path(rootPath, "extdata/input_files", "simulation.xml")
xmlObject <- xml2::as_list(xml2::read_xml(xmlFile))
flatten_deepest(xmlObject)


bogdanoancea/simutils documentation built on April 4, 2022, 2:58 p.m.