xml_to_table | R Documentation |
convert xml to a table
xml_to_table(xmlData, dataItems, dataTypes, parentLevel)
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 |
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.
A data.table with the columns representing the data items
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.