R/xml.R
add_logit_tables_xml_generate_levels.Rd
This is basically a combination of add_xml_data_generate_levels
and
add_logit_tables_xml
check the documentation for each to understand
the individual behaviors.
add_logit_tables_xml_generate_levels(
dot,
data,
header,
old_tag,
new_tag,
num_levels,
rename_final,
column_name = old_tag,
column_order_lookup = header,
base_logit_header = header
)
The current state of the pipeline started from create_xml
The tibble of data to add to the conversion
The base header tag to can be looked up in the header file to
convert data
besides the additional levels of nesting.
The XML tag which is being expanded to add more levels
The XML tag which will serve as the additional levels
The number of additional levels to generate
Whether to rename the final old_tag
to
new_tag
in the original header
The base name of the column in data
which will get
expanded by appending paste0(column_name, (seq_len(num_levels) - 1))
A tag that can be used to look up LEVEL2_DATA_NAMES
to reorder the columns of data before XML conversion to ensure they correspond
with the ModelInterface header. Note by default the header
is used then we
append the additional columns generated by column_name
+ num_levels
. If
given NULL
no column reordering will be done.
The base header tag to use for the generated logit type
tables such that paste(base_logit_header, logit.type, sep = "_")
corresponds
to the appropriate model interface header. Note by default this value is the
same as header
as often this is the case but certainly not always.
A "data structure" to hold the various parts needed to run the model interface CSV to XML conversion.