Skip to content

Commit 6b79d98

Browse files
committed
fixed control object printing
1 parent 8f278ef commit 6b79d98

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ S3method(predict_raw,"_multnet")
3232
S3method(predict_raw,model_fit)
3333
S3method(print,boost_tree)
3434
S3method(print,decision_tree)
35+
S3method(print,fit_control)
3536
S3method(print,linear_reg)
3637
S3method(print,logistic_reg)
3738
S3method(print,mars)

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
of possible varying arguments is returned (as opposed to only the arguments
1212
that are actually varying).
1313

14+
* `fit_control()` not returns an S3 method.
15+
1416
## Bug Fixes
1517

1618
* `varying_args()` now uses the version from the `generics` package. This means

R/fit_control.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ fit_control <- function(verbosity = 1L, catch = FALSE) {
2626
res
2727
}
2828

29-
# '@export
29+
#' @export
3030
print.fit_control <- function(x, ...) {
3131
cat("parsnip control object\n")
3232
if (x$verbosity > 1)
33-
cat(" verbose mode\n")
34-
if (x$catch > 1)
35-
cat(" fit errors will be caught\n")
33+
cat(" - verbose level", x$verbosity, "\n")
34+
if (x$catch)
35+
cat(" - fit errors will be caught\n")
3636
invisible(x)
3737
}

0 commit comments

Comments
 (0)