Skip to content

Commit

Permalink
fix na handling in vine() control checks (#266)
Browse files Browse the repository at this point in the history
Co-authored-by: tnagler <thomas.nagler@tum.de>
  • Loading branch information
tnagler and tnagler committed Nov 14, 2023
1 parent f9e3ddd commit c8da749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ check_margin_controls <- function(data, ctrl) {
}
}
if (!is.nan(ctrl$xmin[k])) {
if (any(data[, k] < ctrl$xmin[k])) {
if (any(data[, k] < ctrl$xmin[k], na.rm = TRUE)) {
stop(msg_var, "not all data are larger than xmin.")
}
}
if (!is.nan(ctrl$xmax[k])) {
if (any(data[, k] > ctrl$xmax[k])) {
if (any(data[, k] > ctrl$xmax[k], na.rm = TRUE)) {
stop(msg_var, "not all data are samller than xmax.")
}
}
Expand Down

0 comments on commit c8da749

Please sign in to comment.