Verified Commit f5c87b31 authored by Cody L Marquart's avatar Cody L Marquart
Browse files

Fix summary

parent 52ca2f92
Pipeline #46979 passed with stages
in 4 minutes and 17 seconds
......@@ -85,10 +85,11 @@ summary.TestList = function(object, ...) {
args = list(...)
stats <- object[[length(object)]]$one_v_classifier
summary = list(
stats$test_set$kappa, stats$test_set$N, stats$test_set$rho,
stats$training_set$kappa, stats$training_set$N
)
)
class(summary) = "summary.TestList"
summary
......@@ -151,9 +152,12 @@ print.summary.TestList = function(x, ...) {
#' @return List of Code summary
#' @export
summary.Code = function( object, ... ) {
statsSummary = summary(object$statistics)
statsSummary <- NULL
if(length(object$statistics)) {
statsSummary <- summary(object$statistics)
}
this.summary = list(
this.summary <- list(
object$name,
object$codeSet$title,
object$definition,
......@@ -164,7 +168,7 @@ summary.Code = function( object, ... ) {
object$baserateInflation
)
class(this.summary) = "summary.Code"
class(this.summary) <- "summary.Code"
this.summary
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment