supplement_data_from_list.Rd
These function supplement a entity nodes with clustered entity values
from other entities specified in the target entity nodes. Both the
target entity and the source entity have to be clustering entities.
Use supplement_data_from_list_inSingleNode()
for one entity node, and
supplement_data_from_list_inRxsTrees()
for all nodes containing the
field that identifies the node to copy the values from (i.e. as specified
in sourceEntityNodeIdField_in_targetEntity
).
supplement_data_from_list_inRxsTrees(
x,
sourceEntityNodeIdField_in_targetEntity,
idField_in_targetEntityNode = NULL,
idField_in_sourceEntityNode = NULL,
fieldsToCopy_regex = NULL,
sourcePathString_regex = NULL,
targetPathString_regex = NULL,
forceCopyingOfExistingValues = FALSE,
prefix = "supplemented_",
suffix = "",
silent = metabefor::opts$get("silent")
)
supplement_data_from_list_inSingleNode(
rxsTree,
targetEntityNodeId,
sourceEntityNodeIdField_in_targetEntity,
idField_in_targetEntityNode = NULL,
idField_in_sourceEntityNode = NULL,
fieldsToCopy_regex = NULL,
forceCopyingOfExistingValues = FALSE,
sourcePathString_regex = NULL,
targetPathString_regex = NULL,
prefix = "supplemented_",
suffix = "",
silent = metabefor::opts$get("silent")
)
supplement_data_from_lists(
rxsTree,
sourceEntityNodeIdField_in_targetEntity,
idField_in_targetEntityNode = NULL,
idField_in_sourceEntityNode = NULL,
fieldsToCopy_regex = NULL,
sourcePathString_regex = NULL,
targetPathString_regex = NULL,
forceCopyingOfExistingValues = FALSE,
prefix = "supplemented_",
suffix = "",
silent = metabefor::opts$get("silent")
)
Either a single Rxs tree or an object with parsed Rxs files.
Inside the target entity node, the name holding the identifier of the source entity node (the node supplying the data). Note that that field is itself an entity as specified in the entity specification spreadsheet.
NULL
if the target node's name is also its
identifier; otherwise, the name of the field containing the identifier in
the target node.
NULL
if the source node's name is also its
identifier; otherwise, the name of the field containing the identifier in
the source node.
A regular expression that can optionally be used to select fields to copy over from the source node to the target node.
Regular expressions that must match the path string of the source of target node.
Whether to force copying (and so
overwriting) existing values if encountered in the target entity. If
FALSE
, existing values will not be overwritten.
A text string to prepend and append to the names of the values that are copied.
Whether to be quiet or chatty.
The Rxs tree
The identifier of the target entity node (the node to supplement)
Invisibly, the (altered) input - but note that since the data.tree
package uses R6
's pass-by-reference semantics, that object is altered in
place, and sothe returned object can be discarded.