We need a function that converts the traits.build relational tables into a single wide table. This function is intended to be used for releases of traits.build databases, but could also be used by researchers working on a database between releases/new traits.build databases.
Based on comments from long-standing pull-request, this is tied up with the need to merge some austraits functions into traits.build (issue #168)
Requirements include:
All information in the relational tables is merged into a single wide table.
Wide table to be split back into the individual relational tables [if possible].
Function is properly documented and exported
Retain identifiers that are inherent to the {traits.build} data model. These will also be essential to making the combined table able to be split back into relational tables. There could be an argument that lets these be retained for releases (default), but removed if someone wants a simpler output with fewer columns.
Test to ensure combined table function creates the intended output.
Latitude and longitude are retained as actual columns, not collapsed with other location properties.
As the contents for each relational table will be collapsed into condensed columns, need to have syntax that can be used for collapsing columns that does not appear elsewhere in the data. Therefore, pre-emptively replace all instances of :, ;, <, > within columns where these characters take on a special meaning.
We need a function that converts the traits.build relational tables into a single wide table. This function is intended to be used for releases of traits.build databases, but could also be used by researchers working on a database between releases/new traits.build databases.
Based on comments from long-standing pull-request, this is tied up with the need to merge some austraits functions into traits.build (issue #168)
Requirements include: