From 7c1f979ac3b472fc4c3358aa72b31fc631750570 Mon Sep 17 00:00:00 2001 From: Alexandre Courtiol Date: Mon, 25 Sep 2023 10:55:01 +0200 Subject: [PATCH] Remove wrong message about extrapolation (fixes #159) --- IsoriX/R/calibfit.R | 8 -------- IsoriX/inst/NEWS.Rd | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/IsoriX/R/calibfit.R b/IsoriX/R/calibfit.R index b82877f..c5aba68 100644 --- a/IsoriX/R/calibfit.R +++ b/IsoriX/R/calibfit.R @@ -552,14 +552,6 @@ calibfit <- function(data, msg <- paste(msg, "*", sum(points_out), "correspond to locations outside the area covered by the measurements you used to build your isoscape.\n") } - ### check if value extrapolation occurs - too_small <- sum(min(data$mean_source_value, na.rm = TRUE) < min(isofit$info_fit$data$mean_source_value, na.rm = TRUE)) - too_large <- sum(max(data$mean_source_value, na.rm = TRUE) > max(isofit$info_fit$data$mean_source_value, na.rm = TRUE)) - if (too_small + too_large > 0) { - issues_extrapolations <- TRUE - msg <- paste(msg, "*", too_small + too_large, "are associated to predicted values more extreme than the ones present in the isoscape.\n") - } - ## display message if necessary if (issues_extrapolations) { message(paste0(msg, "--> These cases correspond to extrapolation during the calibration step, which could impede the reliability of your assignments.\nIf the proportion of problematic samples is large, you should perhaps rethink the design of your isoscape and/or collect more calibration data within the expected range to avoid any problem.")) diff --git a/IsoriX/inst/NEWS.Rd b/IsoriX/inst/NEWS.Rd index d3504ec..e4b5883 100644 --- a/IsoriX/inst/NEWS.Rd +++ b/IsoriX/inst/NEWS.Rd @@ -31,6 +31,7 @@ \item \code{prepcipitate()} can now handle as input for \code{path =} either the full path to the files returned by \code{getprecip()} -- which contains the folder inputed in \code{path} when calling \code{getprecip()} in addition to \code{"/wc2.1_30s_prec"} -- or the reduced path which only contains the folder inputed in \code{path} when calling \code{getprecip()}. \item \code{getprecip()} now changes the timeout R options temporarily so as to avoid the download to fail because the default timeout setting is too short (#148). \item the documentation for the datasets \code{GNIPDataALLagg} and \code{GNIPDataEUagg} was incorrect (#158). + \item one message about possible extrapolation during calibration was erroneous and is now removed (#159). } } \subsection{Geeky change}{