plotRule: Plot values for a rule.

Description Usage Arguments Value Author(s) Examples

View source: R/plotRule.R

Description

Represent rule as a heatmap or boxplot.

Usage

1
plotRule(dt, rules, type="heatmap", discrete=FALSE, ind=1, label=c())

Arguments

dt

A data frame of decision table. The last column is decision.

rules

A data frame of rule table in a form of rosetta $main output.

discrete

Logical. Set TRUE for non-discrete data. Default is FALSE.

type

A character indciating plot type. Heatmap or boxplot.

ind

A numeric value of index of the rule in the table.

label

A character vector indciating new labels for the rule discrete levels.

Value

heatmap

A heatmap representing objects distribution in the model for the rule.

boxplot

A boxplots representing objects distribution in the model for the rule.

Author(s)

Mateusz Garbulowski

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(R.ROSETTA)

out <- rosetta(autcon)
rules <- out$main
recRules <- recalculateRules(autcon, rules)

# heatmap
plotRule(autcon, recRules, type="heatmap", discrete=FALSE, ind=1, label = c("high","low"))
plotRule(autcon, recRules, type="heatmap", discrete=FALSE, ind=7, label = c("high","high"))


# boxplot
plotRule(autcon, recRules, type="boxplot", discrete=FALSE, ind=1, label = c("high","low"))
plotRule(autcon, recRules, type="boxplot", discrete=FALSE, ind=7, label = c("high","high"))

mategarb/R.ROSETTA documentation built on Aug. 20, 2020, 5:21 a.m.