Skip to content

Commit

Permalink
exclude NA when computing scale: fixes #193
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed Oct 19, 2022
1 parent 95d1f4c commit e5c3d14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/smooth-estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@
guide_title <- "Partial\neffect"
plot_var <- "est"
guide_limits <- if (is.null(ylim)) {
c(-1, 1) * max(abs(object[[plot_var]]))
c(-1, 1) * max(abs(object[[plot_var]]), na.rm = TRUE)
} else {
ylim
}
Expand Down Expand Up @@ -1132,7 +1132,7 @@
guide_title <- "Partial\neffect"
plot_var <- "est"
guide_limits <- if (is.null(ylim)) {
c(-1, 1) * max(abs(object[[plot_var]]))
c(-1, 1) * max(abs(object[[plot_var]]), na.rm = TRUE)
} else {
ylim
}
Expand Down Expand Up @@ -1268,7 +1268,7 @@
guide_title <- "Partial\neffect"
plot_var <- "est"
guide_limits <- if (is.null(ylim)) {
c(-1, 1) * max(abs(object[[plot_var]]))
c(-1, 1) * max(abs(object[[plot_var]]), na.rm = TRUE)
} else {
ylim
}
Expand Down Expand Up @@ -1578,7 +1578,7 @@
guide_title <- "Partial\neffect"
plot_var <- "est"
guide_limits <- if (is.null(ylim)) {
c(-1, 1) * max(abs(object[[plot_var]]))
c(-1, 1) * max(abs(object[[plot_var]]), na.rm = TRUE)
} else {
ylim
}
Expand Down

0 comments on commit e5c3d14

Please sign in to comment.