transform_entityValue.Rd
This function takes a full Rxs project object (as produced
by rxs_parseExtractionScripts()
) and processes all Rxs
trees, looking for entities that match the entityId_regex
regular expression (for information about what clustering entities are,
see https://r-packages.gitlab.io/metabefor/articles/definitions.html)
and passes those to function fun
, passing the entity's value as the
argument named in entityValue_argName
and with funArgs
as additional
arguments.
transform_entityValue(
x,
fun,
entityValue_argName = "x",
entityId_regex = NULL,
newEntityName_prefix = "",
newEntityName_suffix = "_trfmd",
funArgs = NULL,
requiredField_regex = NULL
)
The full Rxs project object (as produced
by rxs_parseExtractionScripts()
).
The function to apply.
The argument name to pass the entity value as.
An optional regular expression: if specified, only entity nodes with entity identifiers that match this regular expression will be processed.
The prefix and suffix to add to the entity identifier to create the name of the new entity that is created. That entity is added as a sibling of the target entity.
Additional arguments, as a names list with each element's name is the argument name and the element itself the content.
This functionality has not yet been implemented.
Invisibly, the full Rxs project object. Note that the Rxs trees
will be changed in place given data.tree
's pass-by-reference logic; so
you can discard the result.