From 4010b9658fc38a3042af0f95578c86a29d8877c0 Mon Sep 17 00:00:00 2001 From: Michael Mahoney Date: Mon, 24 Apr 2023 14:01:15 -0400 Subject: [PATCH] Faster multi_scale (#34) * Make ww_multi_scale() faster * Update snaps * Only import necessary functions * Improve documentation * Fix NOTE --- DESCRIPTION | 2 +- NEWS.md | 3 + R/multi_scale.R | 141 ++++++++++-------- R/waywiser-package.R | 2 +- man/ww_multi_scale.Rd | 25 +++- .../testthat/_snaps/area_of_applicability.md | 41 +++-- tests/testthat/_snaps/misc.md | 31 ++-- tests/testthat/_snaps/misc_yardstick.md | 38 +++-- tests/testthat/_snaps/multi_scale.md | 68 +++++---- .../_snaps/srr-ww_agreement_coefficient.md | 59 +++++--- .../_snaps/srr-ww_area_of_applicability.md | 104 ++++++++----- .../testthat/_snaps/srr-ww_global_geary_c.md | 78 ++++++---- .../_snaps/srr-ww_global_geary_pvalue.md | 78 ++++++---- .../testthat/_snaps/srr-ww_global_moran_i.md | 78 ++++++---- .../_snaps/srr-ww_global_moran_pvalue.md | 78 ++++++---- tests/testthat/_snaps/srr-ww_local_geary_c.md | 78 ++++++---- .../_snaps/srr-ww_local_geary_pvalue.md | 78 ++++++---- .../_snaps/srr-ww_local_getis_ord_g.md | 78 ++++++---- .../_snaps/srr-ww_local_getis_ord_g_pvalue.md | 78 ++++++---- tests/testthat/_snaps/srr-ww_local_moran_i.md | 78 ++++++---- .../_snaps/srr-ww_local_moran_pvalue.md | 78 ++++++---- ...srr-ww_systematic_agreement_coefficient.md | 59 +++++--- .../testthat/_snaps/srr-ww_systematic_mpd.md | 59 +++++--- .../testthat/_snaps/srr-ww_systematic_mse.md | 59 +++++--- .../testthat/_snaps/srr-ww_systematic_rmpd.md | 59 +++++--- .../testthat/_snaps/srr-ww_systematic_rmse.md | 59 +++++--- ...r-ww_unsystematic_agreement_coefficient.md | 59 +++++--- .../_snaps/srr-ww_unsystematic_mpd.md | 59 +++++--- .../_snaps/srr-ww_unsystematic_mse.md | 59 +++++--- .../_snaps/srr-ww_unsystematic_rmpd.md | 59 +++++--- .../_snaps/srr-ww_unsystematic_rmse.md | 59 +++++--- tests/testthat/_snaps/srr-ww_willmott_d.md | 59 +++++--- tests/testthat/_snaps/srr-ww_willmott_d1.md | 59 +++++--- tests/testthat/_snaps/srr-ww_willmott_dr.md | 59 +++++--- tests/testthat/_snaps/tidy_importance.md | 10 +- 35 files changed, 1279 insertions(+), 792 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 41915f1..68dfa88 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -48,7 +48,7 @@ Imports: hardhat, Matrix, purrr, - rlang, + rlang (>= 1.1.0), sf (>= 1.0-0), spdep (>= 1.1-9), stats, diff --git a/NEWS.md b/NEWS.md index 4d25619..1d640b8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,9 @@ `data`. This is a bit faster than passing `SpatRaster` objects to `truth` and `estimate`, as extraction is only done once per grid rather than twice, but does not easily support passing R functions to `aggregation_function`. + +* The `sf` method for `ww_multi_scale()` is now _much_ faster (and more memory + efficient). # waywiser 0.3.0 diff --git a/R/multi_scale.R b/R/multi_scale.R index 0b5dccd..28a840c 100644 --- a/R/multi_scale.R +++ b/R/multi_scale.R @@ -4,7 +4,9 @@ #' #' If `data` is `NULL`, then `truth` and `estimate` should both be `SpatRaster` #' objects, as created via [terra::rast()]. These rasters will then be -#' aggregated to each grid using [exactextractr::exact_extract()]. +#' aggregated to each grid using [exactextractr::exact_extract()]. If `data` +#' is a `SpatRaster` object, then `truth` and `estimate` should be indices to +#' select the appropriate layers of the raster via [terra::subset()]. #' #' Grids are calculated using the bounding box of `truth`, under the assumption #' that you may have extrapolated into regions which do not have matching "true" @@ -31,6 +33,14 @@ #' then `cellsize` will be automatically adjusted to create the requested #' number of cells. #' +#' Grids are created by mapping over each argument passed via `...` +#' simultaneously, in a similar manner to [mapply()] or [purrr::pmap()]. This +#' means that, for example, passing `n = list(c(1, 2))` will create a single +#' 1x2 grid, while passing `n = c(1, 2)` will create a 1x1 grid _and_ a 2x2 +#' grid. It also means that arguments will be recycled using R's standard +#' vector recycling rules, so that passing `n = c(1, 2)` and `square = FALSE` +#' will create two separate grids of hexagons. +#' #' This function can be used for geographic or projected coordinate reference #' systems and expects 2D data. #' @@ -380,21 +390,36 @@ ww_multi_scale.sf <- function( grid_list <- handle_grids(data, grids, autoexpand_grid, ...) - grid_list$grid_intersections <- purrr::map( + data$.grid_idx <- seq_len(nrow(data)) + out <- purrr::map2_dfr( grid_list$grids, - function(grid) { - out <- sf::st_intersects(grid, data) - out[purrr::map_lgl(out, function(x) !identical(x, integer(0)))] - } - ) + grid_list$grid_arg_idx, + function(grid, grid_args_idx) { + grid_args <- grid_list[["grid_args"]][grid_args_idx, ] - .notes <- purrr::map( - grid_list$grid_intersections, - function(idx) { - missing <- setdiff(seq_len(nrow(data)), unlist(idx)) + grid <- sf::st_as_sf(grid) - note <- character(0) + data_crs <- sf::st_crs(data) + grid_crs <- sf::st_crs(grid) + # If both have a CRS, reproject + if (!is.na(data_crs) && !is.na(grid_crs)) { + grid <- sf::st_transform(grid, data_crs) + # if only data has CRS, assume grid in same + } else if (!is.na(data_crs)) { + grid <- sf::st_set_crs(grid, data_crs) + } + # if neither has a CRS, ignore (so, implicitly assume grid is in same) + + grid$grid_cell_idx <- seq_len(nrow(grid)) + grid_matches <- sf::st_join( + grid, + data[".grid_idx"], + left = FALSE + ) + grid_matches <- sf::st_drop_geometry(grid_matches) + missing <- setdiff(data[[".grid_idx"]], grid_matches[[".grid_idx"]]) + note <- character(0) if (length(missing) > 0) { note <- "Some observations were not within any grid cell, and as such were not used in any assessments. Their row numbers are in the `missing_indices` column." missing <- list(missing) @@ -402,71 +427,63 @@ ww_multi_scale.sf <- function( missing <- list() } - tibble::tibble( + notes_tibble <- tibble::tibble( note = note, missing_indices = missing ) - } - ) - if (any(purrr::map_lgl(.notes, function(x) nrow(x) > 0))) { - rlang::warn( - c( - "Some observations were not within any grid cell, and as such were not used in any assessments.", - i = "See the `.notes` column for details." + matched_data <- dplyr::left_join( + data, + grid_matches, + by = dplyr::join_by(.grid_idx) ) - ) - } - - grid_list$grid_intersections <- purrr::map( - grid_list$grid_intersections, - function(idx_list) { - out <- purrr::map_dfr( - idx_list, - function(idx) { - dplyr::summarise( - data[idx, , drop = FALSE], - .truth = rlang::exec(.env[["aggregation_function"]], {{ truth }}), - .truth_count = sum(!is.na({{ truth }})), - .estimate = rlang::exec(.env[["aggregation_function"]], {{ estimate }}), - .estimate_count = sum(!is.na({{ estimate }})), - .groups = "keep" - ) - } + matched_data <- sf::st_drop_geometry(matched_data) + matched_data <- matched_data[!is.na(matched_data[["grid_cell_idx"]]), ] + matched_data <- dplyr::group_by( + matched_data, + dplyr::across(dplyr::all_of(c(dplyr::group_vars(data), "grid_cell_idx"))) + ) + matched_data <- dplyr::summarise( + matched_data, + .truth = rlang::exec(.env[["aggregation_function"]], {{ truth }}), + .truth_count = sum(!is.na({{ truth }})), + .estimate = rlang::exec(.env[["aggregation_function"]], {{ estimate }}), + .estimate_count = sum(!is.na({{ estimate }})), + .groups = "drop" ) if (dplyr::is_grouped_df(data)) { - dplyr::group_by(out, !!!dplyr::groups(data)) - } else { - out + matched_data <- dplyr::group_by(matched_data, !!!dplyr::groups(data)) } - } - ) - purrr::pmap_dfr( - list( - dat = grid_list$grid_intersections, - grid = grid_list$grids, - grid_arg = grid_list$grid_arg_idx, - .notes = .notes - ), - function(dat, grid, grid_arg, .notes) { - out <- metrics(dat, .truth, .estimate, na_rm = na_rm) + out <- metrics(matched_data, .truth, .estimate, na_rm = na_rm) + out["grid_cell_idx"] <- NULL out[attr(out, "sf_column")] <- NULL - out$.grid_args <- list(grid_list$grid_args[grid_arg, ]) - out$.grid <- list( - suppressMessages( # We want to ignore a "names repair" message here - sf::st_join( - sf::st_as_sf(grid), - dat, - sf::st_contains - ) - ) + out$.grid_args <- list(grid_args) + .grid <- dplyr::left_join( + grid, + matched_data, + by = dplyr::join_by(grid_cell_idx) ) - out$.notes <- list(.notes) + .grid["grid_cell_idx"] <- NULL + out$.grid <- list(.grid) + out$.notes <- list(notes_tibble) out + } ) + + if (any(purrr::map_lgl(out[[".notes"]], function(x) nrow(x) > 0))) { + rlang::warn( + c( + "Some observations were not within any grid cell, and as such were not used in any assessments.", + i = "See the `.notes` column for details." + ) + ) + } + + out + } handle_metrics <- function(metrics) { diff --git a/R/waywiser-package.R b/R/waywiser-package.R index 05c2f66..ee782da 100644 --- a/R/waywiser-package.R +++ b/R/waywiser-package.R @@ -5,6 +5,6 @@ #' @importFrom rlang enquo .data .env #' @importFrom stats predict complete.cases na.fail #' @importFrom yardstick new_numeric_metric -utils::globalVariables(c(".truth", ".estimate")) +utils::globalVariables(c(".truth", ".estimate", ".grid_idx", "grid_cell_idx")) ## usethis namespace: end NULL diff --git a/man/ww_multi_scale.Rd b/man/ww_multi_scale.Rd index 389afee..6c42f12 100644 --- a/man/ww_multi_scale.Rd +++ b/man/ww_multi_scale.Rd @@ -18,14 +18,17 @@ ww_multi_scale( ) } \arguments{ -\item{data}{Either a point geometry \code{sf} object containing the columns -specified by the \code{truth} and \code{estimate} arguments, or \code{NULL} if \code{truth} and -\code{estimate} are \code{SpatRaster} objects.} +\item{data}{Either: a point geometry \code{sf} object containing the columns +specified by the \code{truth} and \code{estimate} arguments; a \code{SpatRaster} from +the \code{terra} package containing layers specified by the \code{truth} and \code{estimate} +arguments; or \code{NULL} if \code{truth} and \code{estimate} are \code{SpatRaster} objects.} \item{truth, estimate}{If \code{data} is an \code{sf} object, the names (optionally unquoted) for the columns in \code{data} containing the true and predicted values, -respectively. If \code{data} is \code{NULL}, \code{SpatRaster} objects with a single layer -containing the true and predicted values, respectively.} +respectively. If \code{data} is a \code{SpatRaster} object, either layer names or +indices which will select the true and predicted layers, respectively, via +\code{\link[terra:subset]{terra::subset()}} If \code{data} is \code{NULL}, \code{SpatRaster} objects with a single +layer containing the true and predicted values, respectively.} \item{metrics}{Either a \code{\link[yardstick:metric_set]{yardstick::metric_set()}} object, or a list of functions which will be used to construct a \code{\link[yardstick:metric_set]{yardstick::metric_set()}} object @@ -81,7 +84,9 @@ Evaluate metrics at multiple scales of aggregation If \code{data} is \code{NULL}, then \code{truth} and \code{estimate} should both be \code{SpatRaster} objects, as created via \code{\link[terra:rast]{terra::rast()}}. These rasters will then be -aggregated to each grid using \code{\link[exactextractr:exact_extract]{exactextractr::exact_extract()}}. +aggregated to each grid using \code{\link[exactextractr:exact_extract]{exactextractr::exact_extract()}}. If \code{data} +is a \code{SpatRaster} object, then \code{truth} and \code{estimate} should be indices to +select the appropriate layers of the raster via \code{\link[terra:subset]{terra::subset()}}. Grids are calculated using the bounding box of \code{truth}, under the assumption that you may have extrapolated into regions which do not have matching "true" @@ -111,6 +116,14 @@ is provided, this function will return as many blocks of size then \code{cellsize} will be automatically adjusted to create the requested number of cells. +Grids are created by mapping over each argument passed via \code{...} +simultaneously, in a similar manner to \code{\link[=mapply]{mapply()}} or \code{\link[purrr:pmap]{purrr::pmap()}}. This +means that, for example, passing \code{n = list(c(1, 2))} will create a single +1x2 grid, while passing \code{n = c(1, 2)} will create a 1x1 grid \emph{and} a 2x2 +grid. It also means that arguments will be recycled using R's standard +vector recycling rules, so that passing \code{n = c(1, 2)} and \code{square = FALSE} +will create two separate grids of hexagons. + This function can be used for geographic or projected coordinate reference systems and expects 2D data. } diff --git a/tests/testthat/_snaps/area_of_applicability.md b/tests/testthat/_snaps/area_of_applicability.md index 251d731..f5fb7b1 100644 --- a/tests/testthat/_snaps/area_of_applicability.md +++ b/tests/testthat/_snaps/area_of_applicability.md @@ -8,8 +8,9 @@ Code ww_area_of_applicability(y ~ ., train, test, importance) - Error - Missing values in training data. + Condition + Error in `create_aoa()`: + ! Missing values in training data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- @@ -26,8 +27,9 @@ Code ww_area_of_applicability(train[2:11], test[2:11], importance) - Error - Missing values in training data. + Condition + Error in `create_aoa()`: + ! Missing values in training data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- @@ -45,8 +47,9 @@ Code ww_area_of_applicability(as.matrix(train[2:11]), as.matrix(test[2:11]), importance) - Error - Missing values in training data. + Condition + Error in `create_aoa()`: + ! Missing values in training data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- @@ -64,7 +67,8 @@ Code ww_area_of_applicability(comb_rset_no_y, importance = importance) - Error + Condition + Error in `purrr::map()`: i In index: 1. Caused by error in `create_aoa()`: ! Missing values in training data. @@ -84,7 +88,8 @@ Code ww_area_of_applicability(comb_rset, recipes::recipe(y ~ ., train), importance = importance) - Error + Condition + Error in `purrr::map()`: i In index: 1. Caused by error in `create_aoa()`: ! Missing values in training data. @@ -126,29 +131,33 @@ Code ww_area_of_applicability(y ~ ., train, test[1:10], importance) - Error - Some columns in `training` were not present in `testing` (or `new_data`). + Condition + Error in `check_di_testing()`: + ! Some columns in `training` were not present in `testing` (or `new_data`). --- Code ww_area_of_applicability(y ~ ., train, test, na_rm = c(TRUE, FALSE), importance) - Error - Only one value can be passed to `na_rm`. + Condition + Error in `create_aoa()`: + ! Only one value can be passed to `na_rm`. --- Code ww_area_of_applicability(y ~ ., train, test, head(importance, -1)) - Error - All predictors must have an importance value in `importance`. + Condition + Error in `ww_area_of_applicability()`: + ! All predictors must have an importance value in `importance`. --- Code ww_area_of_applicability(y ~ ., train[1:10], test[1:10], importance) - Error - All variables with an importance value in `importance` must be included as predictors. + Condition + Error in `ww_area_of_applicability()`: + ! All variables with an importance value in `importance` must be included as predictors. # normal use diff --git a/tests/testthat/_snaps/misc.md b/tests/testthat/_snaps/misc.md index 0b21faf..5f6bcc0 100644 --- a/tests/testthat/_snaps/misc.md +++ b/tests/testthat/_snaps/misc.md @@ -71,7 +71,8 @@ Code ww_build_neighbors(sf::st_cast(guerry, "MULTILINESTRING")) - Warning + Condition + Warning: Non-point or polygon geometry specified, calculating neighbors using sf::st_centroid() i To avoid this, provide neighbors explicitly i Or provide a neighbor-creating function @@ -87,8 +88,9 @@ Code ww_build_neighbors(guerry, function(data) data) - Error - Couldn't figure out how to build an `nb` object from the provided arguments + Condition + Error: + ! Couldn't figure out how to build an `nb` object from the provided arguments # ww_build_weights is stable @@ -129,7 +131,8 @@ Code ww_build_weights(sf::st_cast(guerry, "MULTILINESTRING")) - Warning + Condition + Warning: Non-point or polygon geometry specified, calculating neighbors using sf::st_centroid() i To avoid this, provide neighbors explicitly i Or provide a neighbor-creating function @@ -151,8 +154,9 @@ Code ww_build_weights(guerry, function(data) data) - Error - Couldn't figure out how to build a `listw` object from the provided arguments + Condition + Error: + ! Couldn't figure out how to build a `listw` object from the provided arguments --- @@ -175,20 +179,23 @@ Code ww_build_neighbors(as.data.frame(guerry)) - Error - `data` must be an `sf` or `sfc` object. + Condition + Error: + ! `data` must be an `sf` or `sfc` object. --- Code ww_make_point_neighbors(as.data.frame(guerry)) - Error - `data` must be an `sf` or `sfc` object. + Condition + Error in `ww_make_point_neighbors()`: + ! `data` must be an `sf` or `sfc` object. --- Code ww_make_point_neighbors(guerry, k = c(1, 5)) - Error - `k` must be a single numeric integer. + Condition + Error in `ww_make_point_neighbors()`: + ! `k` must be a single numeric integer. diff --git a/tests/testthat/_snaps/misc_yardstick.md b/tests/testthat/_snaps/misc_yardstick.md index 8263bba..fa679a9 100644 --- a/tests/testthat/_snaps/misc_yardstick.md +++ b/tests/testthat/_snaps/misc_yardstick.md @@ -23,7 +23,8 @@ Code ww_local_getis_ord_g(guerry_modeled, Crm_prs, predictions, wt = list()) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `spatial_yardstick_vec()`: ! `wt` must be a 'listw' object @@ -33,44 +34,50 @@ Code ww_local_getis_ord_g_vec(as.character(crm), prd, structure(list(), class = "listw")) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_local_getis_ord_g_vec(crm, as.character(prd), structure(list(), class = "listw")) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_local_getis_ord_g_vec(as.matrix(crm), prd, structure(list(), class = "listw")) - Error - `truth` must be a numeric vector. + Condition + Error in `yardstick_vec()`: + ! `truth` must be a numeric vector. --- Code ww_local_getis_ord_g_vec(crm, as.matrix(prd), structure(list(), class = "listw")) - Error - `estimate` must be a numeric vector. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be a numeric vector. --- Code ww_local_getis_ord_g_vec(crm, numeric(), structure(list(), class = "listw")) - Error - Length of `truth` (85) and `estimate` (0) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (85) and `estimate` (0) must match. --- Code ww_local_getis_ord_g_vec(crm, prd, structure(list(), class = "listw"), na_action = na.omit) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -78,7 +85,8 @@ Code withr::with_seed(123, ww_local_getis_ord_g_vec(crm, prd, structure(list(), class = "listw"), na_action = function(x) runif(sample(1:100, sample(1:100, 1))))) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. diff --git a/tests/testthat/_snaps/multi_scale.md b/tests/testthat/_snaps/multi_scale.md index a40dd69..6fc592c 100644 --- a/tests/testthat/_snaps/multi_scale.md +++ b/tests/testthat/_snaps/multi_scale.md @@ -28,7 +28,8 @@ Code ww_multi_scale(ames_sf, Sale_Price, predictions, n = list(c(1, 1)), autoexpand_grid = FALSE) - Warning + Condition + Warning: Some observations were not within any grid cell, and as such were not used in any assessments. i See the `.notes` column for details. Output @@ -43,8 +44,9 @@ Code ww_multi_scale(guerry_modeled, Crm_prs, predictions, n = list(c(1, 1)), metrics = yardstick::rmse) - Error - ww_multi_scale is currently only implemented for point geometries. + Condition + Error in `ww_multi_scale()`: + ! ww_multi_scale is currently only implemented for point geometries. i Consider casting your data to points. --- @@ -52,43 +54,49 @@ Code ww_multi_scale(suppressWarnings(sf::st_centroid(guerry_modeled)), Crm_prs, predictions, n = list(c(1, 1)), na_rm = c(TRUE, FALSE), metrics = yardstick::rmse) - Error - Only one logical value can be passed to `na_rm`. + Condition + Error in `ww_multi_scale()`: + ! Only one logical value can be passed to `na_rm`. --- Code ww_multi_scale(iris, Sepal.Length, Sepal.Width, n = list(c(1, 1)), metrics = yardstick::rmse) - Error - no applicable method for 'ww_multi_scale' applied to an object of class "data.frame" + Condition + Error in `UseMethod()`: + ! no applicable method for 'ww_multi_scale' applied to an object of class "data.frame" # srr: expected failures for ww_multi_scale Code ww_multi_scale(worldclim_predicted, predicted, response, n = c(2, 4)) - Error - `truth` must be numeric. + Condition + Error in `ww_multi_scale()`: + ! `truth` must be numeric. --- Code ww_multi_scale(worldclim_predicted, response, predicted, n = c(2, 4)) - Error - `estimate` must be numeric. + Condition + Error in `ww_multi_scale()`: + ! `estimate` must be numeric. --- Code ww_multi_scale(worldclim_predicted, predicted, response, n = c(2, 4)) - Error - `truth` must be numeric. + Condition + Error in `ww_multi_scale()`: + ! `truth` must be numeric. --- Code ww_multi_scale(worldclim_predicted, response, predicted, n = c(2, 4)) - Error - `estimate` must be numeric. + Condition + Error in `ww_multi_scale()`: + ! `estimate` must be numeric. --- @@ -138,15 +146,17 @@ Code ww_multi_scale(head(worldclim_predicted, 0), response, predicted, n = c(2, 4)) - Error - 0 rows were passed to `data`. + Condition + Error in `ww_multi_scale()`: + ! 0 rows were passed to `data`. --- Code ww_multi_scale(head(worldclim_predicted, 0), predicted, response, n = c(2, 4)) - Error - 0 rows were passed to `data`. + Condition + Error in `ww_multi_scale()`: + ! 0 rows were passed to `data`. --- @@ -191,28 +201,32 @@ Code ww_multi_scale(truth = 1) - Error - `truth` must be a SpatRaster with only one layer. + Condition + Error in `ww_multi_scale_raster_args()`: + ! `truth` must be a SpatRaster with only one layer. --- Code ww_multi_scale(truth = c(terra::rast(r1), terra::rast(r1))) - Error - `truth` must be a SpatRaster with only one layer. + Condition + Error in `ww_multi_scale_raster_args()`: + ! `truth` must be a SpatRaster with only one layer. --- Code ww_multi_scale(truth = terra::rast(r1), estimate = 1) - Error - `estimate` must be a SpatRaster with only one layer. + Condition + Error in `ww_multi_scale_raster_args()`: + ! `estimate` must be a SpatRaster with only one layer. --- Code ww_multi_scale(truth = terra::rast(r1), estimate = c(terra::rast(r1), terra::rast( r1))) - Error - `estimate` must be a SpatRaster with only one layer. + Condition + Error in `ww_multi_scale_raster_args()`: + ! `estimate` must be a SpatRaster with only one layer. diff --git a/tests/testthat/_snaps/srr-ww_agreement_coefficient.md b/tests/testthat/_snaps/srr-ww_agreement_coefficient.md index bb71221..943e5c8 100644 --- a/tests/testthat/_snaps/srr-ww_agreement_coefficient.md +++ b/tests/testthat/_snaps/srr-ww_agreement_coefficient.md @@ -2,21 +2,24 @@ Code ww_agreement_coefficient_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_agreement_coefficient_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_agreement_coefficient(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_agreement_coefficient(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_agreement_coefficient_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_agreement_coefficient_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_agreement_coefficient(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_agreement_coefficient(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_agreement_coefficient_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_agreement_coefficient(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_agreement_coefficient(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_agreement_coefficient_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_agreement_coefficient_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_agreement_coefficient(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_agreement_coefficient(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_area_of_applicability.md b/tests/testthat/_snaps/srr-ww_area_of_applicability.md index 002b329..bca37cf 100644 --- a/tests/testthat/_snaps/srr-ww_area_of_applicability.md +++ b/tests/testthat/_snaps/srr-ww_area_of_applicability.md @@ -2,21 +2,24 @@ Code ww_area_of_applicability(y ~ ., train, test, importance) - Error - All variables in `data` and `testing` must inherit either numeric or integer classes. + Condition + Error in `ww_area_of_applicability()`: + ! All variables in `data` and `testing` must inherit either numeric or integer classes. --- Code ww_area_of_applicability(train, test, importance) - Error - All predictors must be numeric. + Condition + Error: + ! All predictors must be numeric. --- Code ww_area_of_applicability(comb_rset_no_y, importance = importance) - Error + Condition + Error in `purrr::map()`: i In index: 1. Caused by error in `purrr::map()`: ! All predictors must be numeric. @@ -25,21 +28,24 @@ Code ww_area_of_applicability(y ~ ., train, test, importance) - Error - invalid type (list) for variable 'x3' + Condition + Error in `model.frame.default()`: + ! invalid type (list) for variable 'x3' --- Code ww_area_of_applicability(train, test, importance) - Error - All predictors must be numeric. + Condition + Error: + ! All predictors must be numeric. --- Code ww_area_of_applicability(comb_rset_no_y, importance = importance) - Error + Condition + Error in `purrr::map()`: i In index: 1. Caused by error in `purrr::map()`: ! All predictors must be numeric. @@ -48,76 +54,86 @@ Code ww_area_of_applicability(y ~ ., head(train, 0), test, importance) - Error - 0 rows were passed as training data. + Condition + Error in `create_aoa()`: + ! 0 rows were passed as training data. --- Code ww_area_of_applicability(y ~ ., train, head(test, 0), importance) - Error - 0 rows were passed as testing data. + Condition + Error in `create_aoa()`: + ! 0 rows were passed as testing data. --- Code ww_area_of_applicability(head(train[2:11], 0), test[2:11], importance) - Error - 0 rows were passed as training data. + Condition + Error in `create_aoa()`: + ! 0 rows were passed as training data. --- Code ww_area_of_applicability(train[2:11], head(test[2:11], 0), importance) - Error - 0 rows were passed as testing data. + Condition + Error in `create_aoa()`: + ! 0 rows were passed as testing data. --- Code ww_area_of_applicability(head(as.matrix(train[2:11]), 0), as.matrix(test[2:11]), importance) - Error - 0 rows were passed as training data. + Condition + Error in `create_aoa()`: + ! 0 rows were passed as training data. --- Code ww_area_of_applicability(as.matrix(train[2:11]), head(as.matrix(test[2:11]), 0), importance) - Error - 0 rows were passed as testing data. + Condition + Error in `create_aoa()`: + ! 0 rows were passed as testing data. --- Code ww_area_of_applicability(y ~ ., train_na, test, importance) - Error - Missing values in training data. + Condition + Error in `create_aoa()`: + ! Missing values in training data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- Code ww_area_of_applicability(y ~ ., train, test_na, importance) - Error - Missing values in testing data. + Condition + Error in `check_di_testing()`: + ! Missing values in testing data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- Code ww_area_of_applicability(train_na[2:11], test[2:11], importance) - Error - Missing values in training data. + Condition + Error in `create_aoa()`: + ! Missing values in training data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- Code ww_area_of_applicability(train[2:11], test_na[2:11], importance) - Error - Missing values in testing data. + Condition + Error in `check_di_testing()`: + ! Missing values in testing data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- @@ -125,8 +141,9 @@ Code ww_area_of_applicability(as.matrix(train_na[2:11]), as.matrix(test[2:11]), importance) - Error - Missing values in training data. + Condition + Error in `create_aoa()`: + ! Missing values in training data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- @@ -134,15 +151,17 @@ Code ww_area_of_applicability(as.matrix(train[2:11]), as.matrix(test_na[2:11]), importance) - Error - Missing values in testing data. + Condition + Error in `check_di_testing()`: + ! Missing values in testing data. i Either process your data to fix NA values, or set `na_rm = TRUE`. --- Code ww_area_of_applicability(comb_rset_no_y_train_na, importance = importance) - Error + Condition + Error in `purrr::map()`: i In index: 1. Caused by error in `create_aoa()`: ! Missing values in training data. @@ -152,7 +171,8 @@ Code ww_area_of_applicability(comb_rset_no_y, comb_rset_no_y_test_na, importance) - Error + Condition + Error in `purrr::map()`: i In index: 1. Caused by error in `purrr::map()`: ! All predictors must be numeric. @@ -161,7 +181,8 @@ Code ww_area_of_applicability(y ~ ., train, train, importance) - Warning + Condition + Warning: The AOA threshold was 0, which is usually unexpected. Output # Predictors: @@ -173,7 +194,8 @@ Code ww_area_of_applicability(train[2:11], train[2:11], importance) - Warning + Condition + Warning: The AOA threshold was 0, which is usually unexpected. Output # Predictors: @@ -186,7 +208,8 @@ Code ww_area_of_applicability(as.matrix(train[2:11]), as.matrix(train[2:11]), importance) - Warning + Condition + Warning: The AOA threshold was 0, which is usually unexpected. Output # Predictors: @@ -198,7 +221,8 @@ Code ww_area_of_applicability(comb_rset_no_y_identical, importance = importance) - Warning + Condition + Warning: The AOA threshold was 0, which is usually unexpected. Output # Predictors: diff --git a/tests/testthat/_snaps/srr-ww_global_geary_c.md b/tests/testthat/_snaps/srr-ww_global_geary_c.md index c6444c3..d0ba7f0 100644 --- a/tests/testthat/_snaps/srr-ww_global_geary_c.md +++ b/tests/testthat/_snaps/srr-ww_global_geary_c.md @@ -3,22 +3,25 @@ Code ww_global_geary_c_vec(worldclim_predicted$response, tail(worldclim_predicted$ predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_global_geary_c_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_global_geary_c(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_global_geary_c(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_global_geary_c_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_global_geary_c_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_global_geary_c(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_global_geary_c(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_global_geary_c(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_c(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_global_geary_c_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_global_geary_c_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_c_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_global_geary_c(head(worldclim_predicted, 0), response, predicted, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_global_geary_c(head(worldclim_predicted, 0), predicted, response, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_global_geary_c_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_c(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_c(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_global_geary_pvalue.md b/tests/testthat/_snaps/srr-ww_global_geary_pvalue.md index 1953a6c..2bb5bdb 100644 --- a/tests/testthat/_snaps/srr-ww_global_geary_pvalue.md +++ b/tests/testthat/_snaps/srr-ww_global_geary_pvalue.md @@ -3,22 +3,25 @@ Code ww_global_geary_pvalue_vec(worldclim_predicted$response, tail( worldclim_predicted$predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_global_geary_pvalue_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_global_geary_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_global_geary_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_global_geary_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_global_geary_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_global_geary_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_global_geary_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_global_geary_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_global_geary_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_global_geary_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_pvalue_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_global_geary_pvalue(head(worldclim_predicted, 0), response, predicted, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_global_geary_pvalue(head(worldclim_predicted, 0), predicted, response, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_global_geary_pvalue_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_geary_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_global_moran_i.md b/tests/testthat/_snaps/srr-ww_global_moran_i.md index fd83d98..85330fc 100644 --- a/tests/testthat/_snaps/srr-ww_global_moran_i.md +++ b/tests/testthat/_snaps/srr-ww_global_moran_i.md @@ -3,22 +3,25 @@ Code ww_global_moran_i_vec(worldclim_predicted$response, tail(worldclim_predicted$ predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_global_moran_i_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_global_moran_i(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_global_moran_i(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_global_moran_i_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_global_moran_i_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_global_moran_i(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_global_moran_i(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_global_moran_i(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_i(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_global_moran_i_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_global_moran_i_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_i_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_global_moran_i(head(worldclim_predicted, 0), response, predicted, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_global_moran_i(head(worldclim_predicted, 0), predicted, response, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_global_moran_i_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_i(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_i(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_global_moran_pvalue.md b/tests/testthat/_snaps/srr-ww_global_moran_pvalue.md index b0d4477..caaa96b 100644 --- a/tests/testthat/_snaps/srr-ww_global_moran_pvalue.md +++ b/tests/testthat/_snaps/srr-ww_global_moran_pvalue.md @@ -3,22 +3,25 @@ Code ww_global_moran_pvalue_vec(worldclim_predicted$response, tail( worldclim_predicted$predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_global_moran_pvalue_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_global_moran_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_global_moran_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_global_moran_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_global_moran_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_global_moran_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_global_moran_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_global_moran_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_global_moran_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_global_moran_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_pvalue_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_global_moran_pvalue(head(worldclim_predicted, 0), response, predicted, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_global_moran_pvalue(head(worldclim_predicted, 0), predicted, response, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_global_moran_pvalue_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_global_moran_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_local_geary_c.md b/tests/testthat/_snaps/srr-ww_local_geary_c.md index d0a477e..3331669 100644 --- a/tests/testthat/_snaps/srr-ww_local_geary_c.md +++ b/tests/testthat/_snaps/srr-ww_local_geary_c.md @@ -3,22 +3,25 @@ Code ww_local_geary_c_vec(worldclim_predicted$response, tail(worldclim_predicted$ predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_local_geary_c_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_local_geary_c(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_local_geary_c(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_local_geary_c_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_local_geary_c_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_local_geary_c(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_local_geary_c(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_local_geary_c(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_c(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_local_geary_c_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_local_geary_c_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_c_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_local_geary_c(head(worldclim_predicted, 0), response, predicted, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_local_geary_c(head(worldclim_predicted, 0), predicted, response, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -131,24 +146,27 @@ Code ww_local_geary_c_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_c(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_c(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_local_geary_pvalue.md b/tests/testthat/_snaps/srr-ww_local_geary_pvalue.md index f95b554..ca5aca5 100644 --- a/tests/testthat/_snaps/srr-ww_local_geary_pvalue.md +++ b/tests/testthat/_snaps/srr-ww_local_geary_pvalue.md @@ -3,22 +3,25 @@ Code ww_local_geary_pvalue_vec(worldclim_predicted$response, tail( worldclim_predicted$predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_local_geary_pvalue_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_local_geary_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_local_geary_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_local_geary_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_local_geary_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_local_geary_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_local_geary_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_local_geary_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_local_geary_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_local_geary_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_pvalue_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_local_geary_pvalue(head(worldclim_predicted, 0), response, predicted, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_local_geary_pvalue(head(worldclim_predicted, 0), predicted, response, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_local_geary_pvalue_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_geary_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_local_getis_ord_g.md b/tests/testthat/_snaps/srr-ww_local_getis_ord_g.md index 6cb899c..703f259 100644 --- a/tests/testthat/_snaps/srr-ww_local_getis_ord_g.md +++ b/tests/testthat/_snaps/srr-ww_local_getis_ord_g.md @@ -3,22 +3,25 @@ Code ww_local_getis_ord_g_vec(worldclim_predicted$response, tail(worldclim_predicted$ predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_local_getis_ord_g_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_local_getis_ord_g(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_local_getis_ord_g(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_local_getis_ord_g_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_local_getis_ord_g_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_local_getis_ord_g(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_local_getis_ord_g(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_local_getis_ord_g(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_local_getis_ord_g_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_local_getis_ord_g_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_local_getis_ord_g(head(worldclim_predicted, 0), response, predicted, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_local_getis_ord_g(head(worldclim_predicted, 0), predicted, response, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_local_getis_ord_g_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_local_getis_ord_g_pvalue.md b/tests/testthat/_snaps/srr-ww_local_getis_ord_g_pvalue.md index cbf158e..72aa9b2 100644 --- a/tests/testthat/_snaps/srr-ww_local_getis_ord_g_pvalue.md +++ b/tests/testthat/_snaps/srr-ww_local_getis_ord_g_pvalue.md @@ -3,22 +3,25 @@ Code ww_local_getis_ord_g_pvalue_vec(worldclim_predicted$response, tail( worldclim_predicted$predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_local_getis_ord_g_pvalue_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_local_getis_ord_g_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_local_getis_ord_g_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_local_getis_ord_g_pvalue_vec(worldclim_predicted$response, worldclim_predicted$predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_local_getis_ord_g_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_local_getis_ord_g_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_local_getis_ord_g_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_local_getis_ord_g_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_local_getis_ord_g_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_local_getis_ord_g_pvalue_vec(worldclim_predicted$response, worldclim_predicted$predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g_pvalue_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_local_getis_ord_g_pvalue(head(worldclim_predicted, 0), response, predicted, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_local_getis_ord_g_pvalue(head(worldclim_predicted, 0), predicted, response, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_local_getis_ord_g_pvalue_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_getis_ord_g_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_local_moran_i.md b/tests/testthat/_snaps/srr-ww_local_moran_i.md index 3ad6167..e6d1cb6 100644 --- a/tests/testthat/_snaps/srr-ww_local_moran_i.md +++ b/tests/testthat/_snaps/srr-ww_local_moran_i.md @@ -3,22 +3,25 @@ Code ww_local_moran_i_vec(worldclim_predicted$response, tail(worldclim_predicted$ predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_local_moran_i_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_local_moran_i(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_local_moran_i(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_local_moran_i_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_local_moran_i_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_local_moran_i(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_local_moran_i(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_local_moran_i(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_i(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_local_moran_i_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_local_moran_i_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_i_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_local_moran_i(head(worldclim_predicted, 0), response, predicted, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_local_moran_i(head(worldclim_predicted, 0), predicted, response, structure( list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -131,24 +146,27 @@ Code ww_local_moran_i_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_i(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_i(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_local_moran_pvalue.md b/tests/testthat/_snaps/srr-ww_local_moran_pvalue.md index ce51274..9f67543 100644 --- a/tests/testthat/_snaps/srr-ww_local_moran_pvalue.md +++ b/tests/testthat/_snaps/srr-ww_local_moran_pvalue.md @@ -3,22 +3,25 @@ Code ww_local_moran_pvalue_vec(worldclim_predicted$response, tail( worldclim_predicted$predicted, -1), worldclim_weights) - Error - Length of `truth` (10000) and `estimate` (9999) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (10000) and `estimate` (9999) must match. --- Code ww_local_moran_pvalue_vec(tail(worldclim_predicted$response, -1), worldclim_predicted$predicted, worldclim_weights) - Error - Length of `truth` (9999) and `estimate` (10000) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (9999) and `estimate` (10000) must match. --- Code ww_local_moran_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -27,7 +30,8 @@ Code ww_local_moran_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -37,22 +41,25 @@ Code ww_local_moran_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_local_moran_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_local_moran_pvalue(worldclim_predicted, response, predicted) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -61,7 +68,8 @@ Code ww_local_moran_pvalue(worldclim_predicted, predicted, response) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -70,16 +78,18 @@ Code ww_local_moran_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -87,8 +97,9 @@ Code ww_local_moran_pvalue_vec(worldclim_predicted$predicted, worldclim_predicted$ response, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- @@ -96,23 +107,26 @@ Code ww_local_moran_pvalue_vec(worldclim_predicted$response, worldclim_predicted$ predicted, worldclim_weights) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_pvalue_vec(numeric(), numeric(), structure(list(), class = "listw")) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_local_moran_pvalue(head(worldclim_predicted, 0), response, predicted, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -122,7 +136,8 @@ Code ww_local_moran_pvalue(head(worldclim_predicted, 0), predicted, response, structure(list(), class = "listw")) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(...)`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -132,24 +147,27 @@ Code ww_local_moran_pvalue_vec(NA_real_, NA_real_, structure(list(neighbours = 1), class = "listw")) - Error - Missing values in data. + Condition + Error in `spatial_yardstick_vec()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_pvalue(worldclim_predicted, response, predicted)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- Code ww_local_moran_pvalue(worldclim_predicted, predicted, response)$.estimate - Error - Missing values in data. + Condition + Error in `spatial_yardstick_df()`: + ! Missing values in data. i waywiser can't handle missing data for functions that use spatial weights. --- diff --git a/tests/testthat/_snaps/srr-ww_systematic_agreement_coefficient.md b/tests/testthat/_snaps/srr-ww_systematic_agreement_coefficient.md index fd9a54b..c7bede7 100644 --- a/tests/testthat/_snaps/srr-ww_systematic_agreement_coefficient.md +++ b/tests/testthat/_snaps/srr-ww_systematic_agreement_coefficient.md @@ -2,21 +2,24 @@ Code ww_systematic_agreement_coefficient_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_systematic_agreement_coefficient_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_systematic_agreement_coefficient(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_systematic_agreement_coefficient(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_systematic_agreement_coefficient_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_systematic_agreement_coefficient_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_systematic_agreement_coefficient(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_systematic_agreement_coefficient(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_systematic_agreement_coefficient_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_agreement_coefficient(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_systematic_agreement_coefficient(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_systematic_agreement_coefficient_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_agreement_coefficient_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_agreement_coefficient(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_systematic_agreement_coefficient(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_systematic_mpd.md b/tests/testthat/_snaps/srr-ww_systematic_mpd.md index aee311b..eb54bd4 100644 --- a/tests/testthat/_snaps/srr-ww_systematic_mpd.md +++ b/tests/testthat/_snaps/srr-ww_systematic_mpd.md @@ -2,21 +2,24 @@ Code ww_systematic_mpd_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_systematic_mpd_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_systematic_mpd(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_systematic_mpd(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_systematic_mpd_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_systematic_mpd_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_systematic_mpd(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_systematic_mpd(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_systematic_mpd_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_mpd(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_systematic_mpd(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_systematic_mpd_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_mpd_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_mpd(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_systematic_mpd(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_systematic_mse.md b/tests/testthat/_snaps/srr-ww_systematic_mse.md index 6204ff9..2093a3d 100644 --- a/tests/testthat/_snaps/srr-ww_systematic_mse.md +++ b/tests/testthat/_snaps/srr-ww_systematic_mse.md @@ -2,21 +2,24 @@ Code ww_systematic_mse_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_systematic_mse_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_systematic_mse(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_systematic_mse(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_systematic_mse_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_systematic_mse_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_systematic_mse(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_systematic_mse(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_systematic_mse_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_mse(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_systematic_mse(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_systematic_mse_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_mse_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_mse(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_systematic_mse(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_systematic_rmpd.md b/tests/testthat/_snaps/srr-ww_systematic_rmpd.md index dc38a27..0f08305 100644 --- a/tests/testthat/_snaps/srr-ww_systematic_rmpd.md +++ b/tests/testthat/_snaps/srr-ww_systematic_rmpd.md @@ -2,21 +2,24 @@ Code ww_systematic_rmpd_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_systematic_rmpd_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_systematic_rmpd(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_systematic_rmpd(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_systematic_rmpd_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_systematic_rmpd_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_systematic_rmpd(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_systematic_rmpd(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_systematic_rmpd_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_rmpd(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_systematic_rmpd(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_systematic_rmpd_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_rmpd_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_rmpd(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_systematic_rmpd(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_systematic_rmse.md b/tests/testthat/_snaps/srr-ww_systematic_rmse.md index 2bdd9ef..c9b8d12 100644 --- a/tests/testthat/_snaps/srr-ww_systematic_rmse.md +++ b/tests/testthat/_snaps/srr-ww_systematic_rmse.md @@ -2,21 +2,24 @@ Code ww_systematic_rmse_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_systematic_rmse_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_systematic_rmse(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_systematic_rmse(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_systematic_rmse_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_systematic_rmse_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_systematic_rmse(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_systematic_rmse(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_systematic_rmse_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_rmse(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_systematic_rmse(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_systematic_rmse_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_rmse_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_systematic_rmse(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_systematic_rmse(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_unsystematic_agreement_coefficient.md b/tests/testthat/_snaps/srr-ww_unsystematic_agreement_coefficient.md index 421ce74..63ef65b 100644 --- a/tests/testthat/_snaps/srr-ww_unsystematic_agreement_coefficient.md +++ b/tests/testthat/_snaps/srr-ww_unsystematic_agreement_coefficient.md @@ -2,21 +2,24 @@ Code ww_unsystematic_agreement_coefficient_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_unsystematic_agreement_coefficient_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_unsystematic_agreement_coefficient(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_unsystematic_agreement_coefficient(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_unsystematic_agreement_coefficient_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_unsystematic_agreement_coefficient_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_unsystematic_agreement_coefficient(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_unsystematic_agreement_coefficient(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_unsystematic_agreement_coefficient_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_agreement_coefficient(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_unsystematic_agreement_coefficient(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_unsystematic_agreement_coefficient_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_agreement_coefficient_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_agreement_coefficient(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_unsystematic_agreement_coefficient(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_unsystematic_mpd.md b/tests/testthat/_snaps/srr-ww_unsystematic_mpd.md index 3f6ef5f..697a247 100644 --- a/tests/testthat/_snaps/srr-ww_unsystematic_mpd.md +++ b/tests/testthat/_snaps/srr-ww_unsystematic_mpd.md @@ -2,21 +2,24 @@ Code ww_unsystematic_mpd_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_unsystematic_mpd_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_unsystematic_mpd(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_unsystematic_mpd(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_unsystematic_mpd_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_unsystematic_mpd_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_unsystematic_mpd(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_unsystematic_mpd(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_unsystematic_mpd_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_mpd(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_unsystematic_mpd(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_unsystematic_mpd_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_mpd_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_mpd(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_unsystematic_mpd(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_unsystematic_mse.md b/tests/testthat/_snaps/srr-ww_unsystematic_mse.md index cec47ff..c96756c 100644 --- a/tests/testthat/_snaps/srr-ww_unsystematic_mse.md +++ b/tests/testthat/_snaps/srr-ww_unsystematic_mse.md @@ -2,21 +2,24 @@ Code ww_unsystematic_mse_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_unsystematic_mse_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_unsystematic_mse(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_unsystematic_mse(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_unsystematic_mse_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_unsystematic_mse_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_unsystematic_mse(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_unsystematic_mse(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_unsystematic_mse_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_mse(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_unsystematic_mse(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_unsystematic_mse_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_mse_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_mse(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_unsystematic_mse(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_unsystematic_rmpd.md b/tests/testthat/_snaps/srr-ww_unsystematic_rmpd.md index 4cced0c..b2d6d85 100644 --- a/tests/testthat/_snaps/srr-ww_unsystematic_rmpd.md +++ b/tests/testthat/_snaps/srr-ww_unsystematic_rmpd.md @@ -2,21 +2,24 @@ Code ww_unsystematic_rmpd_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_unsystematic_rmpd_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_unsystematic_rmpd(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_unsystematic_rmpd(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_unsystematic_rmpd_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_unsystematic_rmpd_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_unsystematic_rmpd(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_unsystematic_rmpd(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_unsystematic_rmpd_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_rmpd(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_unsystematic_rmpd(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_unsystematic_rmpd_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_rmpd_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_rmpd(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_unsystematic_rmpd(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_unsystematic_rmse.md b/tests/testthat/_snaps/srr-ww_unsystematic_rmse.md index 1ce38dc..bfa2d77 100644 --- a/tests/testthat/_snaps/srr-ww_unsystematic_rmse.md +++ b/tests/testthat/_snaps/srr-ww_unsystematic_rmse.md @@ -2,21 +2,24 @@ Code ww_unsystematic_rmse_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_unsystematic_rmse_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_unsystematic_rmse(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_unsystematic_rmse(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_unsystematic_rmse_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_unsystematic_rmse_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_unsystematic_rmse(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_unsystematic_rmse(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_unsystematic_rmse_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_rmse(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_unsystematic_rmse(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_unsystematic_rmse_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_rmse_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_unsystematic_rmse(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_unsystematic_rmse(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_willmott_d.md b/tests/testthat/_snaps/srr-ww_willmott_d.md index cfaef22..e18d95b 100644 --- a/tests/testthat/_snaps/srr-ww_willmott_d.md +++ b/tests/testthat/_snaps/srr-ww_willmott_d.md @@ -2,21 +2,24 @@ Code ww_willmott_d_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_willmott_d_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_willmott_d(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_willmott_d(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_willmott_d_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_willmott_d_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_willmott_d(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_willmott_d(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_willmott_d_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_d(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_willmott_d(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_willmott_d_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_d_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_d(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_willmott_d(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_willmott_d1.md b/tests/testthat/_snaps/srr-ww_willmott_d1.md index 8bd8901..a35b503 100644 --- a/tests/testthat/_snaps/srr-ww_willmott_d1.md +++ b/tests/testthat/_snaps/srr-ww_willmott_d1.md @@ -2,21 +2,24 @@ Code ww_willmott_d1_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_willmott_d1_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_willmott_d1(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_willmott_d1(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_willmott_d1_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_willmott_d1_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_willmott_d1(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_willmott_d1(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_willmott_d1_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_d1(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_willmott_d1(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_willmott_d1_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_d1_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_d1(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_willmott_d1(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/srr-ww_willmott_dr.md b/tests/testthat/_snaps/srr-ww_willmott_dr.md index 03f9f72..e28e5a2 100644 --- a/tests/testthat/_snaps/srr-ww_willmott_dr.md +++ b/tests/testthat/_snaps/srr-ww_willmott_dr.md @@ -2,21 +2,24 @@ Code ww_willmott_dr_vec(1:5, 1:4) - Error - Length of `truth` (5) and `estimate` (4) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (5) and `estimate` (4) must match. --- Code ww_willmott_dr_vec(1:4, 1:5) - Error - Length of `truth` (4) and `estimate` (5) must match. + Condition + Error in `yardstick_vec()`: + ! Length of `truth` (4) and `estimate` (5) must match. --- Code ww_willmott_dr(char_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -25,7 +28,8 @@ Code ww_willmott_dr(char_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -34,21 +38,24 @@ Code ww_willmott_dr_vec(as.character(1:5), 1:4) - Error - `truth` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `truth` must be numeric. --- Code ww_willmott_dr_vec(1:5, as.character(1:4)) - Error - `estimate` must be numeric. + Condition + Error in `yardstick_vec()`: + ! `estimate` must be numeric. --- Code ww_willmott_dr(list_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `estimate` must be numeric. @@ -57,7 +64,8 @@ Code ww_willmott_dr(list_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! `truth` must be numeric. @@ -94,14 +102,16 @@ Code ww_willmott_dr_vec(numeric(), numeric()) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_dr(empty_df, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -110,7 +120,8 @@ Code ww_willmott_dr(empty_df, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -119,21 +130,24 @@ Code ww_willmott_dr_vec(rep(NA_real_, 4), 4:1) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_dr_vec(1:4, rep(NA_real_, 4)) - Error - 0 non-missing values were passed to `truth`. + Condition + Error in `yardstick_vec()`: + ! 0 non-missing values were passed to `truth`. --- Code ww_willmott_dr(all_na, x, y) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["x"]], estimate = .data[["y"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. @@ -142,7 +156,8 @@ Code ww_willmott_dr(all_na, y, x) - Error + Condition + Error in `dplyr::reframe()`: i In argument: `.estimate = fn(truth = .data[["y"]], estimate = .data[["x"]], na_rm = .env[["na_rm"]])`. Caused by error in `yardstick_vec()`: ! 0 non-missing values were passed to `truth`. diff --git a/tests/testthat/_snaps/tidy_importance.md b/tests/testthat/_snaps/tidy_importance.md index 2c02c4e..a2c0244 100644 --- a/tests/testthat/_snaps/tidy_importance.md +++ b/tests/testthat/_snaps/tidy_importance.md @@ -2,13 +2,15 @@ Code tidy_importance(list()) - Error - Can't construct a tidy importance table from an object of class list + Condition + Error in `tidy_importance()`: + ! Can't construct a tidy importance table from an object of class list --- Code tidy_importance(data.frame()) - Error - 'term' and 'estimate' must be columns in `importance` + Condition + Error: + ! 'term' and 'estimate' must be columns in `importance`