Verify that a tbl_graph has the right features to be an organisation

check_tbl_graph_is_org(x)

Arguments

x

an object to check

Examples

library(tidygraph) set.seed(1234) tg1 <- create_realistic_org() check_tbl_graph_is_org(tg1) # returns no errors tg2 <- tidygraph::create_star(30)
# NOT RUN { check_tbl_graph_is_org(tg2) # returns an error # }
tg3 <- filter(tg1, unit_id != 1) check_tbl_graph_is_org(tg3)
#> Warning: x is not a rooted tree - orgsurveyr may not work as intended
# returns a warning that the tree is no longer rooted