check_compliant_node {tabnet} | R Documentation |
Check that Node object names are compliant
Description
Check that Node object names are compliant
Usage
check_compliant_node(node)
Arguments
node |
the Node object, or a dataframe ready to be parsed by |
Value
node if it is compliant, else an Error with the column names to fix
Examples
library(dplyr)
library(data.tree)
data(starwars)
starwars_tree <- starwars %>%
mutate(pathString = paste("tree", species, homeworld, `name`, sep = "/"))
# pre as.Node() check
try(check_compliant_node(starwars_tree))
# post as.Node() check
check_compliant_node(as.Node(starwars_tree))
[Package tabnet version 0.6.0 Index]