Skip to content

Commit

Permalink
More careful checking of interp for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Aug 6, 2024
1 parent b27a8ce commit 86580e0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion R/err-sim.R
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,15 @@ rxUiGet.interpLines <- function(x, ...){
length(.interp) == 0) {
return(NULL)
}
if (all(.interp == "default")) {
.lvl <- levels(.interp)
if (length(.lvl) != 5L ||
all(.lvl == ("default" "linear" "locf" "nocb" "midpoint"))) {
return(NULL)
}
if (any(is.na(.interp))) {
return(NULL)
}
if (all(.interp == c"default")) {
# use default
return(NULL)
}
Expand Down

0 comments on commit 86580e0

Please sign in to comment.