Finds trace entries whose node sets overlap with context$nodes
and rewrites their polarity field. Only the most recent
n_recent matching entries are updated (default: 3).
Arguments
- graph
An
rrlm_graph/igraphobject. Used to resolve the project root.- context
An
rrlm_contextobject (output ofquery_context()). The$nodesfield is used to match trace entries.- polarity
Numeric(1) in \([-1, 1]\). New polarity value to apply.
- n_recent
Integer(1). Maximum number of recent matching entries to update. Default
3L.
Examples
if (FALSE) { # \dontrun{
g <- build_rrlm_graph("mypkg")
ctx <- query_context(g, "parse CSV files")
# User says context was helpful:
update_task_polarity(g, ctx, polarity = 0.8)
} # }