validate_ds()
ensures that a data set contains the same identifiers as a specified tree and that
elements of the data set corresponding to leaf vertices in the tree satisfy a user-specified predicate.
Usage
validate_ds(
tree,
ds,
get_keys,
get_prop,
op = function(x) is.numeric(x) & !is.na(x)
)
Arguments
- tree
igraph
directed graph that is a valid single-rooted in-tree and whose vertex names are keys from the data set- ds
data set to be updated; can be any object
- get_keys
function to get keys of the data set called as
get_keys(ds)
- get_prop
function to get the property value to validate for leaf element with id
l
, called asget_prop(ds, l)
- op
logical function to test return value of
get_prop()
(defaultis.numeric()
); returnsTRUE
if OK