Reads multiple XML files, as produced by SIVIM (version 1.2), importing to R data.frame's the most relevant data (relevé table and the respective header), using package xml2, optionally parallelizing the process using package parallel.
Arguments
- files
characterA vector containing the names or paths to the XML files to import or a data.frame with two columns, the first with the names or paths to the XML files and the second with strings corresponding to expressions (to be parsed and evaluated) giving the column indices of the original table order, i.e. of the relevés to extract; for the cases where not the entire column is of interest). If only the names are given, the working directory must point to the files location.- parallelize
logicalIfTRUE(the default) parallelizes the importing process;FALSEfor a non-parallelized version.- n.cores
numericThe number of cores to use in parallelization.- n.chunks
numericThe number of chunks to divide work. Can be deprecated in future.
Value
The function returns a list with the following two components:
- table
a
data.framewith the relevé tables (without the header)- header
a
data.framewith the respective header data
Details
This function uses read_SIVIM_xml to import the data inside the XML files, as exported from SIVIM, merging the data.
Author
Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.