| Title: | Visualise NICE Guidance Documents in a Network |
|---|---|
| Description: | Plots networks and subnetworks with NICE documents organised in a hierarchy. |
| Authors: | J Matthews [aut, cre, cph] |
| Maintainer: | J Matthews <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.0 |
| Built: | 2026-11-26 03:19:51 UTC |
| Source: | https://github.com/cran/visNICE |
A subtree is formed with the specified node at the root. This is a 'cutting': all nodes that are not descendents of the specified node are eliminated. The function returns a (smaller) tree (object of class nicetree), with the specified node as the root.
## S4 method for signature 'nicetree' cutting(h, nodelabel = NULL)## S4 method for signature 'nicetree' cutting(h, nodelabel = NULL)
h |
an object of class nicetree |
nodelabel |
node of interest |
object of class nicetree
h <- nicetree() (h) subh <- cutting(h, "CANCER") (subh)h <- nicetree() (h) subh <- cutting(h, "CANCER") (subh)
constructor for nicetree objects
nicetree()nicetree()
make a nicetree
an object of class nicetree
h <- nicetree()h <- nicetree()
class to represent a tree for nice hierarchy
nodenode id
pnodeparent node id
labdoc code
plabparent doc code
textnice textual info
drugnamescommon names for drugs where known
levlevel of each node (root node is 0)
Nnodenumber of nodes in the tree excluding root node
Nlevnumber of levels in the tree excluding root node
doctypeNICE document type
plot the tree as a network graph
## S4 method for signature 'nicetree' plot( x, circle = TRUE, add_text = FALSE, leaf_label = FALSE, stem_label = TRUE, include_names = FALSE, text_size = 10, text_angle = 45, width = 500, height = 500, hover_msg = TRUE )## S4 method for signature 'nicetree' plot( x, circle = TRUE, add_text = FALSE, leaf_label = FALSE, stem_label = TRUE, include_names = FALSE, text_size = 10, text_angle = 45, width = 500, height = 500, hover_msg = TRUE )
x |
a tree (object of class nicetree) |
circle |
whether or not to arrange graph over a circle |
add_text |
whether or not to label with textual info |
leaf_label |
whether or not leaf nodes will be labelled |
stem_label |
whether or not stem nodes will be labelled |
include_names |
whether or not to include common names in text |
text_size |
annotation text size |
text_angle |
annotation text angle |
width |
graph width |
height |
graph height |
hover_msg |
whether to remind the user that they can hover over nodes |
plots an object of class nicetree as a network, with some display options. Users can hover over nodes to display textual information that would otherwise clutter up the graph.
object of class plotly
h <- nicetree() cutting(h, "SKINCO") |> plot()h <- nicetree() cutting(h, "SKINCO") |> plot()
Prints to console the number of nodes and levels and a cross-table, excluding the root node. Also prints the root node and names of the first layer in the tree (children of the root node).
## S4 method for signature 'nicetree' show(object)## S4 method for signature 'nicetree' show(object)
object |
of class nicetree |
prints summary to console
h <- nicetree() (h)h <- nicetree() (h)