variableImportanceGraph: Produce a variable importance graph

Description Usage Arguments Value See Also Examples

View source: R/variableImportanceGraph.R

Description

variableImportanceGraph produces a variable importance graph

Usage

1
2
variableImportanceGraph(x, y, sumYcheck = TRUE,
  barColor = "rgba(0, 55, 82, 0.6)", lineColor = "#003752", lineWidth = 2)

Arguments

x

character vector

y

numeric vector

sumYcheck

logical value; check that sum(y) == 1?

barColor

character string; fill color for bars (valid color)

lineColor

character string; line color (valid color)

lineWidth

non-negative integer value indicating line width (use 0 to omit)

Value

A horizontal barGraph, where x contains the names of the variables in a model and y contains the model contribution (decimals).

See Also

barGraph, plot_ly

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x <- c(
    "Days Since Last Transaction",
    "Average Order Value",
    "Signed Up Online",
    "Number of Transactions",
    "Tenure",
    "Multi-Category Flag"
)
y <- c(.18, .4, .04, .25, .12, .01)
variableImportanceGraph(x, y)

dnegrey/miscTools documentation built on May 3, 2019, 2:57 p.m.