Skip to content

Commit

Permalink
Remove wrong message about extrapolation (fixes #159)
Browse files Browse the repository at this point in the history
  • Loading branch information
courtiol committed Sep 25, 2023
1 parent e78f3d9 commit 7c1f979
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 0 additions & 8 deletions IsoriX/R/calibfit.R
Original file line number Diff line number Diff line change
Expand Up @@ -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."))
Expand Down
1 change: 1 addition & 0 deletions IsoriX/inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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}{
Expand Down

0 comments on commit 7c1f979

Please sign in to comment.