ox_all: Creates an 'ox_all' object

Description Usage Arguments Details Value Examples

Description

Returns an object of class ox_all, containing data and metadata, from a parsed OpenClinica odm1.3 .xml export file provided as argument.

Usage

1
ox_all(parsed_xml)

Arguments

parsed_xml

An object of class XMLInternalDocument, as returned by XML::xmlParse().

Details

A superficial view of the contents of an ox_all object can be obtained with ox_info.

Value

An object of class ox_all, which is a list of two elements:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# The example odm1.3 xml file address
my_file <- system.file("extdata",
                       "odm1.3_full_example.xml",
                       package = "ox",
                       mustWork = TRUE)

# Parsing the xml file
library(XML)
doc <- xmlParse(my_file)

# Create ox_all object
d <- ox_all(doc)
class(d)
names(d)

# The data element
head(d$data)

# Elements (names) in metadata
names(d$metadata)

# Accessing metadata elements:
# Event definitions
head(d$metadata$event_def)

# Codelist items
head(d$metadata$codelist_item)

# etc.

acobos/ox documentation built on May 13, 2019, 12:17 p.m.