diff --git a/DESCRIPTION b/DESCRIPTION index db8d5f076..8803b7708 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: recipes Title: Preprocessing and Feature Engineering Steps for Modeling -Version: 1.0.10.9000 +Version: 1.1.0 Authors@R: c( person("Max", "Kuhn", , "max@posit.co", role = c("aut", "cre")), person("Hadley", "Wickham", , "hadley@posit.co", role = "aut"), @@ -26,7 +26,7 @@ Imports: generics (>= 0.1.2), glue, gower, - hardhat (>= 1.3.1.9000), + hardhat (>= 1.4.0), ipred (>= 0.9-12), lifecycle (>= 1.0.3), lubridate (>= 1.8.0), @@ -71,5 +71,3 @@ Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.1 -Remotes: - tidymodels/hardhat diff --git a/NEWS.md b/NEWS.md index 763c2cf90..30fd545b9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,46 +1,54 @@ -# recipes (development version) +# recipes 1.1.0 -* New `extract_fit_time()` method has been added that returns the time it took to train the recipe. (#1071) +## Improvements -* `step_spline_b()`, `step_spline_convex()`, `step_spline_monotone()`, and `step_spline_nonnegative()` now throws informative errors if the`degree`, `deg_free`, and `complete_set` arguments causes an error. (#1170) +* Improved error message for misspelled argument in step functions. (#1318) -* Developer helper function `recipes_ptype()` has been added, returning expected input data for `prep()` and `bake()` for a given recipe object. (#1329) +* `recipe()` can now take data.frames with list-columns or sf data.frames as input to `data`. (#1283) -* Developer helper function `recipes_ptype_validate()` has been added, to validate new data is compatible with recipe ptype. (#793) +* `recipe()` will now show better error when columns are misspelled in formula (#1283). -* The `prefix` argument of `step_dummy_multi_choice()` is not properly documented. (#1298) +* `add_role()` now errors if a column would simultaneously have roles `"outcome"` and `"predictor"`. (#935) -* `step_dummy()` now gives an informative error on attempt to generate too many columns to fit in memory. (#828) +* `prep()` will now error if the ptype of the data doesn't match which was used to define the recipe. (#793) -* `NA` levels in factors aren't dropped when passed to `recipe()`. (#1291) +* Added more documentation in `?selections` about how `tidyselect::everything()` works in recipes. (#1259) -* `recipe()` no longer crashes when given long formula expression (#1283). +* New `extract_fit_time()` method has been added that returns the time it took to train the recipe. (#1071) -* `step_interact()` now gives better error if `terms` isn't a formula. (#1299) +* `step_spline_b()`, `step_spline_convex()`, `step_spline_monotone()`, and `step_spline_nonnegative()` now throws informative errors if the`degree`, `deg_free`, and `complete_set` arguments causes an error. (#1170) -* `recipe()` will now show better error when columns are misspelled in formula (#1283). +* `step_mutate()` gained `.pkgs` argument to specify what packages need to be loaded for step to work. (#1282) -* Fixed bug in `step_ns()` and `step_bs()` where `knots` field in `options` argument wasn't correctly used. (#1297) +* `step_interact()` now gives better error if `terms` isn't a formula. (#1299) -* `add_role()` now errors if a column would simultaneously have roles `"outcome"` and `"predictor"`. (#935) +* The `prefix` argument of `step_dummy_multi_choice()` is now properly documented. (#1298) * Significant speedup in `step_dummy()` when applied to many columns. (#1305) -* Bug fixed in `step_interact()` where long formulas were used. (#1231, #1289) - -* `recipe()` can now take data.frames with list-columns or sf data.frames as input to `data`. (#1283) +* `step_dummy()` now gives an informative error on attempt to generate too many columns to fit in memory. (#828) * `step_dummy()` and `step_unknown()` now throw more informative warnings for unseen levels. (#450) * `step_dummy()` now throws more informative warnings for `NA` values. (#450) +## Bug Fixes + +* `NA` levels in factors aren't dropped when passed to `recipe()`. (#1291) + +* `recipe()` no longer crashes when given long formula expression (#1283). + +* Fixed bug in `step_ns()` and `step_bs()` where `knots` field in `options` argument wasn't correctly used. (#1297) + +* Bug fixed in `step_interact()` where long formulas were used. (#1231, #1289) + * Fixed documentation mistake where default value of `keep_original_cols` argument were wrong. (#1314) -* `step_mutate()` gained `.pkgs` argument to specify what packages need to be loaded for step to work. (#1282) +## Developer -* Added more documentation in `?selections` about how `tidyselect::everything()` works in recipes. (#1259) +* Developer helper function `recipes_ptype()` has been added, returning expected input data for `prep()` and `bake()` for a given recipe object. (#1329) -* Improved error message for misspelled argument in step functions. (#1318) +* Developer helper function `recipes_ptype_validate()` has been added, to validate new data is compatible with recipe ptype. (#793) * Developer helper functions `recipes_names_predictors()` and `recipes_names_outcomes()` have been added to aid variable selection in steps. (#1026) diff --git a/R/ptype.R b/R/ptype.R index 11ea37705..ed1387864 100644 --- a/R/ptype.R +++ b/R/ptype.R @@ -40,6 +40,8 @@ #' with `update_role_requirements()`, and `recipes_ptype()` respects those #' changes. #' +#' `recipes_ptype()` returns `NULL` on recipes created prior to version 1.1.0. +#' #' Note that the order of the columns aren't guaranteed to align with #' `data_ptype` as the data internally is ordered according to roles. #' @@ -84,13 +86,9 @@ recipes_ptype <- function(x, ..., stage = "prep") { check_dots_empty0(...) + # recipe created prior to 1.1.0 if (is.null(x$ptype)) { - cli::cli_abort( - c( - x = "Doesn't work on recipes created prior to version 1.1.0.", - i = "Please recreate recipe." - ) - ) + return(NULL) } ptype <- x$ptype @@ -112,6 +110,15 @@ recipes_ptype <- function(x, ..., stage = "prep") { ptype } + +long_function_name <- function(x, + ..., + verbose = FALSE) { + x +} + + + #' Validate prototype of recipe object #' #' This helper function validates a dataframe against the ptype of a recipe. @@ -143,6 +150,12 @@ recipes_ptype_validate <- function(x, stage = "prep", call = rlang::caller_env()) { old_ptype <- recipes_ptype(x, stage = stage) + + # recipe created prior to 1.1.0 + if (is.null(old_ptype)) { + return(invisible()) + } + col_names <- names(old_ptype) new_ptype <- vctrs::vec_ptype(new_data) diff --git a/R/recipe.R b/R/recipe.R index 3cc32930b..27602c98c 100644 --- a/R/recipe.R +++ b/R/recipe.R @@ -596,7 +596,7 @@ bake <- function(object, ...) { #' @param ... One or more selector functions to choose which variables will be #' returned by the function. See [selections()] for more details. #' If no selectors are given, the default is to use -#' [everything()]. +#' [dplyr::everything()]. #' @param composition Either "tibble", "matrix", "data.frame", or #' "dgCMatrix" for the format of the processed data set. Note that #' all computations during the baking process are done in a diff --git a/README.Rmd b/README.Rmd index f215656a0..2fbc4c550 100644 --- a/README.Rmd +++ b/README.Rmd @@ -54,7 +54,7 @@ pak::pak("tidymodels/recipes") ## Contributing -- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://community.rstudio.com/c/ml/15). +- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://forum.posit.co/c/ml/15). - If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/recipes/issues). diff --git a/README.md b/README.md index 3e923b2a4..78ff087eb 100644 --- a/README.md +++ b/README.md @@ -57,18 +57,18 @@ pak::pak("tidymodels/recipes") ## Contributing -- For questions and discussions about tidymodels packages, modeling, - and machine learning, please [post on RStudio - Community](https://community.rstudio.com/c/ml/15). +- For questions and discussions about tidymodels packages, modeling, and + machine learning, please [post on RStudio + Community](https://forum.posit.co/c/ml/15). -- If you think you have encountered a bug, please [submit an - issue](https://github.com/tidymodels/recipes/issues). +- If you think you have encountered a bug, please [submit an + issue](https://github.com/tidymodels/recipes/issues). -- Either way, learn how to create and share a - [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) - (a minimal, reproducible example), to clearly communicate about your - code. +- Either way, learn how to create and share a + [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) + (a minimal, reproducible example), to clearly communicate about your + code. -- Check out further details on [contributing guidelines for tidymodels - packages](https://www.tidymodels.org/contribute/) and [how to get - help](https://www.tidymodels.org/help/). +- Check out further details on [contributing guidelines for tidymodels + packages](https://www.tidymodels.org/contribute/) and [how to get + help](https://www.tidymodels.org/help/). diff --git a/man/bake.Rd b/man/bake.Rd index 119ce5cad..996c24c63 100644 --- a/man/bake.Rd +++ b/man/bake.Rd @@ -16,7 +16,7 @@ one preprocessing operation.} \item{...}{One or more selector functions to choose which variables will be returned by the function. See \code{\link[=selections]{selections()}} for more details. If no selectors are given, the default is to use -\code{\link[=everything]{everything()}}.} +\code{\link[dplyr:reexports]{dplyr::everything()}}.} \item{new_data}{A data frame or tibble for whom the preprocessing will be applied. If \code{NULL} is given to \code{new_data}, the pre-processed \emph{training diff --git a/man/juice.Rd b/man/juice.Rd index 4a17124b1..dcf796b52 100644 --- a/man/juice.Rd +++ b/man/juice.Rd @@ -13,7 +13,7 @@ juice(object, ..., composition = "tibble") \item{...}{One or more selector functions to choose which variables will be returned by the function. See \code{\link[=selections]{selections()}} for more details. If no selectors are given, the default is to use -\code{\link[=everything]{everything()}}.} +\code{\link[dplyr:reexports]{dplyr::everything()}}.} \item{composition}{Either "tibble", "matrix", "data.frame", or "dgCMatrix" for the format of the processed data set. Note that diff --git a/man/recipe.Rd b/man/recipe.Rd index f6ca83b32..0d569cd01 100644 --- a/man/recipe.Rd +++ b/man/recipe.Rd @@ -80,8 +80,8 @@ added to a recipe. \itemize{ \item \strong{Steps} can include operations like scaling a variable, creating dummy variables or interactions, and so on. More computationally -complex actions such as dimension reduction or imputation can also -be specified. +complex actions such as dimension reduction or imputation can also be +specified. \item \strong{Checks} are operations that conduct specific tests of the data. When the test is satisfied, the data are returned without issue or modification. Otherwise, an error is thrown. diff --git a/man/recipes_ptype.Rd b/man/recipes_ptype.Rd index 3d187de11..efb1d54fd 100644 --- a/man/recipes_ptype.Rd +++ b/man/recipes_ptype.Rd @@ -51,6 +51,8 @@ but outcomes and case weights are required. These requirements can be changed with \code{update_role_requirements()}, and \code{recipes_ptype()} respects those changes. +\code{recipes_ptype()} returns \code{NULL} on recipes created prior to version 1.1.0. + Note that the order of the columns aren't guaranteed to align with \code{data_ptype} as the data internally is ordered according to roles. } diff --git a/man/selections.Rd b/man/selections.Rd index 7620151f1..3c14d0e9b 100644 --- a/man/selections.Rd +++ b/man/selections.Rd @@ -116,20 +116,20 @@ will not work. When creating variable selections: \itemize{ -\item If you are using column filtering steps, such as \code{step_corr()}, try -to avoid hardcoding specific variable names in downstream steps in -case those columns are removed by the filter. Instead, use +\item If you are using column filtering steps, such as \code{step_corr()}, try to +avoid hardcoding specific variable names in downstream steps in case +those columns are removed by the filter. Instead, use \code{\link[dplyr:reexports]{dplyr::any_of()}} and \code{\link[dplyr:reexports]{dplyr::all_of()}}. \itemize{ -\item \code{\link[dplyr:reexports]{dplyr::any_of()}} will be tolerant if a -column has been removed. +\item \code{\link[dplyr:reexports]{dplyr::any_of()}} will be tolerant if a column +has been removed. \item \code{\link[dplyr:reexports]{dplyr::all_of()}} will fail unless all of the columns are present in the data. } -\item For both of these functions, if you are going to save the recipe as -a binary object to use in another R session, try to avoid referring -to a vector in your workspace. +\item For both of these functions, if you are going to save the recipe as a +binary object to use in another R session, try to avoid referring to a +vector in your workspace. \itemize{ \item Preferred: \code{any_of(!!var_names)} \item Avoid: \code{any_of(var_names)} @@ -160,7 +160,7 @@ recipe(mpg ~ ., data = mtcars) \%>\% }\if{html}{\out{}} \if{html}{\out{
}}\preformatted{## Error in `step_log()`: -## Caused by error in `prep()` at recipes/R/recipe.R:478:9: +## Caused by error in `prep()` at recipes/R/recipe.R:479:9: ## ! Can't select columns that don't exist. ## x Column `wt` doesn't exist. }\if{html}{\out{
}} diff --git a/man/step_bs.Rd b/man/step_bs.Rd index 7cfbe353c..ffbe6d3d5 100644 --- a/man/step_bs.Rd +++ b/man/step_bs.Rd @@ -69,7 +69,7 @@ columns that are basis expansions of variables using B-splines. \code{step_bs} can create new features from a single variable that enable fitting routines to model this variable in a nonlinear manner. The extent of the possible nonlinearity is -determined by the \code{df}, \code{degree}, or \code{knot} arguments of +determined by the \code{df}, \code{degree}, or \code{knots} arguments of \code{\link[splines:bs]{splines::bs()}}. The original variables are removed from the data and new columns are added. The naming convention for the new variables is \code{varname_bs_1} and so on. diff --git a/revdep/README.md b/revdep/README.md index 77abca2b6..31009f786 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -2,68 +2,22 @@ |field |value | |:--------|:-----------------------------------| -|version |R version 4.3.2 (2023-10-31) | -|os |macOS Sonoma 14.2.1 | +|version |R version 4.4.0 (2024-04-24) | +|os |macOS Sonoma 14.4.1 | |system |aarch64, darwin20 | -|ui |RStudio | +|ui |X11 | |language |(EN) | |collate |en_US.UTF-8 | |ctype |en_US.UTF-8 | |tz |America/Los_Angeles | -|date |2024-02-16 | -|rstudio |2023.12.0+359 Ocean Storm (desktop) | +|date |2024-06-10 | |pandoc |2.17.1.1 @ /opt/homebrew/bin/pandoc | # Dependencies -|package |old |new |Δ | -|:------------|:----------|:----------|:--| -|recipes |1.0.9 |1.0.9.9000 |* | -|cli |3.6.2 |3.6.2 | | -|clock |0.7.0 |0.7.0 | | -|cpp11 |0.4.7 |0.4.7 | | -|data.table |1.15.0 |1.15.0 | | -|diagram |1.6.5 |1.6.5 | | -|digest |0.6.34 |0.6.34 | | -|dplyr |1.1.4 |1.1.4 | | -|ellipsis |0.3.2 |0.3.2 | | -|fansi |1.0.6 |1.0.6 | | -|future |1.33.1 |1.33.1 | | -|future.apply |1.11.1 |1.11.1 | | -|generics |0.1.3 |0.1.3 | | -|globals |0.16.2 |0.16.2 | | -|glue |1.7.0 |1.7.0 | | -|gower |1.0.1 |1.0.1 | | -|hardhat |1.3.1 |1.3.1 | | -|ipred |0.9-14 |0.9-14 | | -|lava |1.7.3 |1.7.3 | | -|lifecycle |1.0.4 |1.0.4 | | -|listenv |0.9.1 |0.9.1 | | -|lubridate |1.9.3 |1.9.3 | | -|magrittr |2.0.3 |2.0.3 | | -|numDeriv |2016.8-1.1 |2016.8-1.1 | | -|parallelly |1.36.0 |1.36.0 | | -|pillar |1.9.0 |1.9.0 | | -|pkgconfig |2.0.3 |2.0.3 | | -|prodlim |2023.08.28 |2023.08.28 | | -|progressr |0.14.0 |0.14.0 | | -|purrr |1.0.2 |1.0.2 | | -|R6 |2.5.1 |2.5.1 | | -|Rcpp |1.0.12 |1.0.12 | | -|rlang |1.1.3 |1.1.3 | | -|shape |1.4.6 |1.4.6 | | -|SQUAREM |2021.1 |2021.1 | | -|stringi |1.8.3 |1.8.3 | | -|stringr |1.5.1 |1.5.1 | | -|tibble |3.2.1 |3.2.1 | | -|tidyr |1.3.1 |1.3.1 | | -|tidyselect |1.2.0 |1.2.0 | | -|timechange |0.3.0 |0.3.0 | | -|timeDate |4032.109 |4032.109 | | -|tzdb |0.4.0 |0.4.0 | | -|utf8 |1.2.4 |1.2.4 | | -|vctrs |0.6.5 |0.6.5 | | -|withr |3.0.0 |3.0.0 | | +|package |old |new |Δ | +|:-------|:------|:-----------|:--| +|recipes |1.0.10 |1.0.10.9000 |* | # Revdeps @@ -74,3 +28,11 @@ |D2MCS |1.0.1 |1 | | | |hydrorecipes |0.0.3 |1 | | | +## New problems (3) + +|package |version |error |warning |note | +|:-----------|:-------|:------|:-------|:----| +|[tidybins](problems.md#tidybins)|0.1.0 |__+1__ | |2 | +|[tidysdm](problems.md#tidysdm)|0.9.4 |__+1__ | | | +|[viraldomain](problems.md#viraldomain)|0.0.3 |__+2__ | | | + diff --git a/revdep/cran.md b/revdep/cran.md index 5a632e069..231417611 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -2,11 +2,24 @@ We checked 71 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. - * We saw 0 new problems + * We saw 3 new problems * We failed to check 2 packages Issues with CRAN packages are summarised below. +### New problems +(This reports the first line of each new failure) + +* tidybins + checking examples ... ERROR + +* tidysdm + checking tests ... + +* viraldomain + checking examples ... ERROR + checking tests ... + ### Failed to check * D2MCS (NA) diff --git a/revdep/failures.md b/revdep/failures.md index c4313bade..fb945d3e7 100644 --- a/revdep/failures.md +++ b/revdep/failures.md @@ -34,7 +34,7 @@ Run `revdepcheck::revdep_details(, "D2MCS")` for more info Error: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(jli, FALSE) error: unable to load shared object '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib': - dlopen(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib, 0x000A): tried: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (no such file), '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) + dlopen(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib, 0x000A): tried: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (no such file), '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')) Execution halted ERROR: lazy loading failed for package ‘D2MCS’ * removing ‘/Users/emilhvitfeldt/Github/recipes/revdep/checks.noindex/D2MCS/new/D2MCS.Rcheck/D2MCS’ @@ -53,7 +53,7 @@ ERROR: lazy loading failed for package ‘D2MCS’ Error: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(jli, FALSE) error: unable to load shared object '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib': - dlopen(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib, 0x000A): tried: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (no such file), '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) + dlopen(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib, 0x000A): tried: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (no such file), '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')) Execution halted ERROR: lazy loading failed for package ‘D2MCS’ * removing ‘/Users/emilhvitfeldt/Github/recipes/revdep/checks.noindex/D2MCS/old/D2MCS.Rcheck/D2MCS’ @@ -91,11 +91,11 @@ Run `revdepcheck::revdep_details(, "hydrorecipes")` for more info ** package ‘hydrorecipes’ successfully unpacked and MD5 sums checked ** using staged installation ** libs -using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ +using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’ using C++11 -using SDK: ‘MacOSX14.2.sdk’ -clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/recipes/new/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o -clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/recipes/new/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c lags.cpp -o lags.o +using SDK: ‘MacOSX14.4.sdk’ +clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o +clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c lags.cpp -o lags.o In file included from lags.cpp:7: ... ** building package indices @@ -118,11 +118,11 @@ ERROR: loading failed ** package ‘hydrorecipes’ successfully unpacked and MD5 sums checked ** using staged installation ** libs -using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ +using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’ using C++11 -using SDK: ‘MacOSX14.2.sdk’ -clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/recipes/old/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o -clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/recipes/old/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c lags.cpp -o lags.o +using SDK: ‘MacOSX14.4.sdk’ +clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o +clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/Rcpp/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppArmadillo/include' -I'/Users/emilhvitfeldt/Github/recipes/revdep/library.noindex/hydrorecipes/RcppParallel/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c lags.cpp -o lags.o In file included from lags.cpp:7: ... ** building package indices diff --git a/revdep/problems.md b/revdep/problems.md index 9a2073633..03c3a4a6a 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -1 +1,168 @@ -*Wow, no problems at all. :)* \ No newline at end of file +# tidybins + +
+ +* Version: 0.1.0 +* GitHub: https://github.com/Harrison4192/tidybins +* Source code: https://github.com/cran/tidybins +* Date/Publication: 2021-10-14 12:20:02 UTC +* Number of recursive dependencies: 164 + +Run `revdepcheck::revdep_details(, "tidybins")` for more info + +
+ +## Newly broken + +* checking examples ... ERROR + ``` + Running examples in ‘tidybins-Ex.R’ failed + The error most likely occurred in: + + > ### Name: bin_cols + > ### Title: Bin Cols + > ### Aliases: bin_cols + > + > ### ** Examples + > + > + ... + 4. └─recipes:::prep.recipe(rec2, training = .data) + 5. ├─recipes:::recipes_error_context(...) + 6. │ ├─base::withCallingHandlers(...) + 7. │ └─base::force(expr) + 8. ├─recipes::prep(x$steps[[i]], training = training, info = x$term_info) + 9. └─embed:::prep.step_discretize_xgb(x$steps[[i]], training = training, info = x$term_info) + 10. └─recipes::recipes_eval_select(x$terms, training, info) + 11. └─cli::cli_abort(...) + 12. └─rlang::abort(...) + Execution halted + ``` + +## In both + +* checking dependencies in R code ... NOTE + ``` + Namespaces in Imports field not imported from: + ‘badger’ ‘ggplot2’ ‘lubridate’ ‘scales’ ‘xgboost’ + All declared Imports should be used. + ``` + +* checking Rd files ... NOTE + ``` + checkRd: (-1) bin_cols.Rd:50: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:51: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:52: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:53: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:54: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:55: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:56: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:57: Lost braces in \itemize; meant \describe ? + checkRd: (-1) bin_cols.Rd:58: Lost braces in \itemize; meant \describe ? + ``` + +# tidysdm + +
+ +* Version: 0.9.4 +* GitHub: https://github.com/EvolEcolGroup/tidysdm +* Source code: https://github.com/cran/tidysdm +* Date/Publication: 2024-03-05 20:30:02 UTC +* Number of recursive dependencies: 167 + +Run `revdepcheck::revdep_details(, "tidysdm")` for more info + +
+ +## Newly broken + +* checking tests ... + ``` + Running ‘spelling.R’ + Running ‘testthat.R’ + ERROR + Running the tests in ‘tests/testthat.R’ failed. + Last 13 lines of output: + * `Y` must have class , not . + Backtrace: + ▆ + 1. ├─recipes::prep(lacerta_rec, training = lacerta_thin %>% sf::st_drop_geometry()) at test_recipe_sf.R:38:3 + 2. ├─tidysdm:::prep.spatial_recipe(...) + ... + 3. ├─base::NextMethod(...) + 4. └─recipes:::prep.recipe(...) + 5. └─recipes:::check_training_set(training, x, fresh) + 6. └─recipes::recipes_ptype_validate(...) + 7. └─cli::cli_abort(msg, call = call) + 8. └─rlang::abort(...) + + [ FAIL 1 | WARN 0 | SKIP 0 | PASS 200 ] + Error: Test failures + Execution halted + ``` + +# viraldomain + +
+ +* Version: 0.0.3 +* GitHub: NA +* Source code: https://github.com/cran/viraldomain +* Date/Publication: 2024-01-21 13:00:08 UTC +* Number of recursive dependencies: 102 + +Run `revdepcheck::revdep_details(, "viraldomain")` for more info + +
+ +## Newly broken + +* checking examples ... ERROR + ``` + Running examples in ‘viraldomain-Ex.R’ failed + The error most likely occurred in: + + > ### Name: normalized_domain_plot + > ### Title: Create a Normalized Domain Plot + > ### Aliases: normalized_domain_plot + > + > ### ** Examples + > + > data(viral) + ... + 7. ├─hardhat::run_mold(blueprint, data = data) + 8. └─hardhat:::run_mold.default_recipe_blueprint(blueprint, data = data) + 9. └─hardhat:::mold_recipe_default_process(...) + 10. ├─recipes::prep(...) + 11. └─recipes:::prep.recipe(...) + 12. └─recipes:::check_training_set(training, x, fresh) + 13. └─recipes::recipes_ptype_validate(...) + 14. └─cli::cli_abort(msg, call = call) + 15. └─rlang::abort(...) + Execution halted + ``` + +* checking tests ... + ``` + Running ‘testthat.R’ + ERROR + Running the tests in ‘tests/testthat.R’ failed. + Last 13 lines of output: + 8. ├─hardhat::mold(x, data) + 9. └─hardhat:::mold.recipe(x, data) + 10. ├─hardhat::run_mold(blueprint, data = data) + 11. └─hardhat:::run_mold.default_recipe_blueprint(blueprint, data = data) + 12. └─hardhat:::mold_recipe_default_process(...) + 13. ├─recipes::prep(...) + 14. └─recipes:::prep.recipe(...) + 15. └─recipes:::check_training_set(training, x, fresh) + 16. └─recipes::recipes_ptype_validate(...) + 17. └─cli::cli_abort(msg, call = call) + 18. └─rlang::abort(...) + + [ FAIL 2 | WARN 0 | SKIP 3 | PASS 0 ] + Error: Test failures + Execution halted + ``` + diff --git a/tests/testthat/_snaps/ptype.md b/tests/testthat/_snaps/ptype.md index 54892147f..d6408a221 100644 --- a/tests/testthat/_snaps/ptype.md +++ b/tests/testthat/_snaps/ptype.md @@ -1,12 +1,3 @@ -# recipes_ptype errors on old recipes - - Code - recipes_ptype(rec) - Condition - Error in `recipes_ptype()`: - x Doesn't work on recipes created prior to version 1.1.0. - i Please recreate recipe. - # recipes_ptype_validate() works Code diff --git a/tests/testthat/test-dummy.R b/tests/testthat/test-dummy.R index 181b51af1..e411271e0 100644 --- a/tests/testthat/test-dummy.R +++ b/tests/testthat/test-dummy.R @@ -333,6 +333,7 @@ test_that("check_name() is used", { }) test_that("throws a informative error for too many levels (#828)", { + skip_on_cran() dat <- data.frame(x = as.character(1:123456)) rec <- recipe(~ ., data = dat) %>% diff --git a/tests/testthat/test-ptype.R b/tests/testthat/test-ptype.R index ceb05863d..a7d479c6b 100644 --- a/tests/testthat/test-ptype.R +++ b/tests/testthat/test-ptype.R @@ -141,14 +141,13 @@ test_that("recipes_ptype() works with formula interface", { ) }) -test_that("recipes_ptype errors on old recipes", { +test_that("recipes_ptype returns NULL on old recipes", { rec <- recipe(mpg ~ ., data = mtcars) # simulate pre-1.1.0 recipe rec$ptype <- NULL - expect_snapshot( - error = TRUE, + expect_null( recipes_ptype(rec) ) })