Skip to contents

This function reads XML files exported from Heurist to build as many dataframes as 'record types' are used in the Heurist database. Each Heurist 'record type' matches a dataframe ; each Heurist 'record' matches a row in a dataframe. Furthermore, this function builds two other dataframes describing fields (type, help text, requirement, repeatability...) and vocabularies.

Usage

hr_import(data.file, structure.file, rename.tab.col)

Arguments

data.file

XML file exported from Heurist including data (fields'values entered in the database) : this XML file can be exported from Heurist via the Explore menu > Export > XML. Be careful : if some records are selected in your Heurist session during the export, only data about theses selected records will be exported.

structure.file

XML file exported from Heurist describing database structure (vocabularies, fields'caracteristics...) : this XML file can be exported from Heurist via the Design menu > Download > Structure (XML).

rename.tab.col

Boolean. FALSE by default. If TRUE, spaces, dashes, slashes, commas, quotations marks, ampersands and parenthesis are removed from colnames and dataframes names, replaced with dots.

Value

Several dataframes

  • Each Heurist 'record type' as a dataframe : in those dataframes, each row matches a Heurist 'record'

  • A dataframe named "z.h.tables.fields" : each row describes a field in an used Heurist 'record type' (type, help text, requirement, repeatability...)

  • A dataframe named "z.h.vocabularies" : each row matches a term in an used Heurist vocabulary ; each term is joined to a level (its ranking position in the vocabulary) and attached to its parents'terms

Details

For more details :