xml_to_table: xml_to_table

View source: R/xml_to_table.R

xml_to_tableR Documentation

xml_to_table

Description

convert xml to a table

Usage

xml_to_table(xmlData, dataItems, dataTypes, parentLevel)

Arguments

xmlData

this is the clinical_data list element produced from the read_rsntl() function

dataitems

this is a vector of items that are wanted the default

parentlevel

this is the common parent level in the xml below which the dataitems are located

Details

This is probably heavily dependent on the version of the data file format and could need regular ammending it. The dataitems and parentlevel parameters are an attempt to make this flexible but possibly will not be sufficient.

Value

A data.table with the columns representing the data items

Examples

xml_data <- read_rsntl(system.file("extdata","2013_B_07-01-2021_13-49-43.RSNTL",package="sentinelreadr"))
tables <- lapply(xml_data$clinical_data,clinical_xml_to_table)


PietaSchofield/sentinelreadr documentation built on Aug. 9, 2024, 11:41 p.m.