Update a code found in a directed graph based on a Klass-classification
update_code(
graph,
code,
date = NA,
output = "code",
combine = TRUE,
report = FALSE
)
If report == TRUE
and length(output) > 1 | TRUE
, the
result will be a data.frame
with number of rows equal to the number
of codes in the sequence of changes between the input code and output code.
The columns in the data.frame
are specified with output
.
If report == TRUE
and length(output) == 1
, the result will be
a character vector with length equal to the number of codes in the sequence
of changes between the input code and output code. The contents of the
character vector is specified with output
.
If report == FALSE
and length(output) > 1 | TRUE
the result
will be a data.frame
with one row representing the last code
in the change sequence and columns specified by output
. If a code
has been split, the result will be NA
. If combine == FALSE
and a code is the result of a combination of codes, the result will be
NA
.
If report == FALSE
and length(output) == 1
, the result will
be a character vector of length one, containing information about the
updated code specified by output
. If a code has been split, the
result will be NA
. If combine == FALSE
and a code is the
result of a combination of codes, the result will be NA
.
A graph generated by klass_graph
.
A Klass code
Optional. The specific date the supplied code is valid in.
Either a character vector, containing one or more of the items
in the list below, or TRUE
to include all columns.
"code"
The Klass code.
"name"
The Klass name.
"validFrom"
The date that the code is valid from.
"validTo"
The date that the code is valid to.
"split"
Logical: Does the code split into two or more codes?
"combined"
Logical: Does two or more codes become this code?
"nextCode"
If split == FALSE
, gives the code this code changed into. NA
otherwise.
TRUE
or FALSE
. See the return section.
TRUE
or FALSE
. See the return section.
See [update_klass] for updating multiple codes in one function call.