Skip to contents

Calculate pairwise distance among a set of rules or between two sets of rules, where each rule defines a subpopulation.

Usage

rule_dist(
  x,
  rules1,
  rules2 = NULL,
  print_plot = TRUE,
  plot_type = c("static", "interactive"),
  heat_lo = "black",
  heat_mid = NA,
  heat_hi = "#F48024",
  verbosity = 1L
)

Arguments

x

Data frame / matrix: Input features (cases by features).

rules1

Character, vector: Rules as combination of conditions on the features of x.

rules2

String, vector, Optional: Rules as combination of conditions on the features of x.

print_plot

Logical: If TRUE, plot heatmap for calculated distance.

plot_type

Character: "static", "interactive": type of graphics to use, base or plotly, respectively.

heat_lo

Color: Heatmap low color.

heat_mid

Color: Heatmap mid color. Default = NA (i.e. create gradient from heat_lo to heat_hi)

heat_hi

Colo: Heatmap hi colo.

verbosity

Integer: Verbosity level.

Details

If only rules1 is provided, computes pairwise distance among rules1, otherwise computes pairwise distance between rules1 and rules2.

Author

EDG