diff --git a/DESCRIPTION b/DESCRIPTION index 5bee0c14..88df690c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,8 +37,7 @@ Imports: tidyr, tune (>= 1.2.0), vctrs (>= 0.6.1), - workflows (>= 1.1.4), - yardstick (>= 1.1.0) + workflows (>= 1.1.4) Suggests: covr, h2o, @@ -51,7 +50,8 @@ Suggests: ranger, rmarkdown, testthat (>= 3.0.0), - workflowsets (>= 0.1.0) + workflowsets (>= 0.1.0), + yardstick (>= 1.1.0) VignetteBuilder: knitr Config/Needs/website: tidyverse/tidytemplate diff --git a/NAMESPACE b/NAMESPACE index 1e42dde9..252f6393 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -77,4 +77,3 @@ importFrom(ggplot2,autoplot) importFrom(rlang,"%||%") importFrom(rlang,caller_env) importFrom(stats,predict) -importFrom(yardstick,metric_set) diff --git a/R/utils.R b/R/utils.R index 02c44f13..32c60e9e 100644 --- a/R/utils.R +++ b/R/utils.R @@ -163,8 +163,3 @@ mode_is_regression <- function(x) { } x } - -# quiet R-CMD-check NOTEs that yardstick is unused -# (see example data .Rmds for usage) -#' @importFrom yardstick metric_set -NULL diff --git a/tests/testthat/test_add_candidates.R b/tests/testthat/test_add_candidates.R index f8c890af..775e0245 100644 --- a/tests/testthat/test_add_candidates.R +++ b/tests/testthat/test_add_candidates.R @@ -18,6 +18,8 @@ library(kernlab) skip_if_not_installed("nnet") library(nnet) +skip_if_not_installed("yardstick") + test_that("stack can add candidates (regression)", { skip_on_cran() diff --git a/tests/testthat/test_blend_predictions.R b/tests/testthat/test_blend_predictions.R index b6e7d01b..fb1c17f6 100644 --- a/tests/testthat/test_blend_predictions.R +++ b/tests/testthat/test_blend_predictions.R @@ -18,6 +18,8 @@ library(kernlab) skip_if_not_installed("nnet") library(nnet) +skip_if_not_installed("yardstick") + test_that("blend_predictions works", { skip_on_cran() diff --git a/vignettes/classification.Rmd b/vignettes/classification.Rmd index 187101df..6bd28125 100644 --- a/vignettes/classification.Rmd +++ b/vignettes/classification.Rmd @@ -27,7 +27,6 @@ library(rsample) library(parsnip) library(workflows) library(recipes) -library(yardstick) library(stacks) library(purrr) library(dplyr) @@ -38,8 +37,10 @@ library(ggplot2) ```{r, include = FALSE} if (rlang::is_installed("ranger") && rlang::is_installed("nnet") && - rlang::is_installed("kernlab")) { + rlang::is_installed("kernlab") && + rlang::is_installed("yardstick")) { run <- TRUE + library(yardstick) } else { run <- FALSE }