Description Usage Arguments Value See Also Examples
gainsChartDT
produces a nicely formatted DT::datatable
representation of a mt_gainsChart
object.
1 2 3 | gainsChartDT(x, scoreFormatType = "int", scoreFormatDigits = 5,
contSumFormatType = "dlr", contSumFormatDigits = 0,
contAvgFormatType = "dlr", contAvgFormatDigits = 0, KScolor = "#FF3005")
|
x |
|
scoreFormatType |
character string; format type for score field(s); valid values are "int", "dlr" and "pct" |
scoreFormatDigits |
non-negative integer value; number of decimal places for score field(s) |
contSumFormatType |
character string; format type for continuous sum field(s); valid values are "int", "dlr" and "pct" |
contSumFormatDigits |
non-negative integer value; number of decimal places for continuous sum field(s) |
contAvgFormatType |
character string; format type for continuous average (mean) field(s); valid values are "int", "dlr" and "pct" |
contAvgFormatDigits |
non-negative integer value; number of decimal places for continuous average (mean) field(s) |
KScolor |
character string; text color for max KS value (valid color) |
A datatable
representation of a mt_gainsChart
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # pull in sample scored data frame
x <- modelSampleScored
# filter to validation subset
x <- x[x$ValidateFlag, ]
# gains chart binary
y <- gainsChart(x$TargetFlag, x$pTargetFlag)
gainsChartDT(y)
# gains chart continuous
y <- gainsChart(x[x$TargetFlag, "TargetValue"], x[x$TargetFlag, "pTargetValue"])
gainsChartDT(y)
# gains chart combined
y <- gainsChart(x$TargetFlag, x$pTargetFlag*x$pTargetValue, x$TargetValue)
gainsChartDT(y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.