You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
From tidyverse/haven#528 - min() and max() throw an error if all values are NA and na.rm = TRUE.
The base R versions return Inf or -Inf respectively.
They should possibly return NA instead of Inf/-Inf, see #1004.
min(NA_real_, na.rm=TRUE)
#> Warning in min(NA_real_, na.rm = TRUE): no non-missing arguments to min;#> returning Inf#> [1] Infvctrs:::min.vctrs_vctr(NA_real_, na.rm=TRUE)
#> Error in idx[[1]]: subscript out of bounds
max(NA_real_, na.rm=TRUE)
#> Warning in max(NA_real_, na.rm = TRUE): no non-missing arguments to max;#> returning -Inf#> [1] -Infvctrs:::max.vctrs_vctr(NA_real_, na.rm=TRUE)
#> Error in idx[[1]]: subscript out of bounds
From tidyverse/haven#528 -
min()
andmax()
throw an error if all values areNA
andna.rm = TRUE
.The base R versions return
Inf
or-Inf
respectively.They should possibly return
NA
instead ofInf
/-Inf
, see #1004.Created on 2021-04-09 by the reprex package (v1.0.0)
The text was updated successfully, but these errors were encountered: