
Render an expert-system hierarchy and open it in a browser
resy_view_expert.RdBuilds the self-contained HTML tree (see
resy_write_expert_html) in a temporary file and opens it in the
default browser. Use resy_write_expert_html directly to keep
the file.
Usage
resy_view_expert(
expert,
section = 3L,
fill = TRUE,
open_level = 1L,
title = NULL,
names = NULL,
name_tag = NULL,
browse = interactive()
)Arguments
- expert
Either a
resy_expertobject (fromresy_read_expert) or aresy_expert_tree(fromresy_expert_tree).- section
Integer; the definition section to use when
expertis aresy_expert. Defaults to3. Ignored for aresy_expert_tree.- fill
Logical; reconstruct the intermediate group levels (see
resy_expert_tree). Defaults toTRUEfor the view, so the page shows a single tree rooted in the formation groups. Ignored for aresy_expert_tree, which is already built.- open_level
Integer; nodes at this level or shallower start expanded. Defaults to
1(the top groups are open, their contents collapsed).- title
Page title; defaults to the section name.
- names
Optional code-to-name lookup for nodes the expert leaves unnamed (see
resy_expert_tree); passresy_eunis_namesfor EUNIS. Ignored for aresy_expert_tree, which is already built.- name_tag
Optional short label shown beside names supplied through
names(for example"EUNIS"), to mark them apart from the expert's own descriptions. Defaults toNULL(no tag).- browse
Logical; open the file in a browser. Defaults to
interactive().
See also
resy_expert_tree for the underlying data frame.
Examples
if (FALSE) { # \dontrun{
f <- system.file("extdata/classifications/Meadow-ESy-2025-01-18-2025.txt",
package = "RESY")
resy_view_expert(resy_read_expert(f))
} # }