| Type: | Package |
| Title: | Visualise NICE Guidance Documents in a Network |
| Version: | 1.0.0 |
| Imports: | tidyr, rlang, plotly, dplyr, purrr, methods, stringr, graphlayouts, igraph |
| Description: | Plots networks and subnetworks with NICE documents organised in a hierarchy. |
| License: | GPL (≥ 3) |
| Encoding: | UTF-8 |
| URL: | https://github.com/jnm212/visNICE, https://jnm212.github.io/visNICE/ |
| BugReports: | https://github.com/jnm212/visNICE/issues |
| Depends: | R (≥ 4.1.0) |
| RoxygenNote: | 7.3.2 |
| NeedsCompilation: | no |
| Packaged: | 2026-11-03 16:43:10 UTC; jmatt |
| Author: | J Matthews [aut, cre, cph] |
| Maintainer: | J Matthews <jnmatt212@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-25 20:30:02 UTC |
visNICE: Visualise NICE Guidance Documents in a Network
Description
Plots networks and subnetworks with NICE documents organised in a hierarchy.
Author(s)
Maintainer: J Matthews jnmatt212@gmail.com [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/jnm212/visNICE/issues
take a cutting from a tree (object of class nicetree)
Description
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.
Usage
## S4 method for signature 'nicetree'
cutting(h, nodelabel = NULL)
Arguments
h |
an object of class nicetree |
nodelabel |
node of interest |
Value
object of class nicetree
Examples
h <- nicetree()
(h)
subh <- cutting(h, "CANCER")
(subh)
constructor for nicetree objects
Description
constructor for nicetree objects
Usage
nicetree()
Details
make a nicetree
Value
an object of class nicetree
Examples
h <- nicetree()
class to represent a tree for nice hierarchy
Description
class to represent a tree for nice hierarchy
Slots
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
Description
plot the tree as a network graph
Usage
## 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
)
Arguments
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 |
Details
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.
Value
object of class plotly
Examples
h <- nicetree()
cutting(h, "SKINCO") |> plot()
summarise nicetree object
Description
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).
Usage
## S4 method for signature 'nicetree'
show(object)
Arguments
object |
of class nicetree |
Value
prints summary to console
Examples
h <- nicetree()
(h)