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.Dismiss alert
In the presence of missing values, boxcox_trans does not work:
trans <- scales::boxcox_trans(p = 0)
# This works:
trans$trans(1:3)
# This does not work:
trans$trans(c(1:3, NA_real_))
The issue is with the if clause. Because any(c(1:3, NA_real_) > 0) returns NA, the condition cannot be evaluated. Adding na.rm = TRUE should fix it. I'm happy to modify the R and the test file if that is helpful.
The text was updated successfully, but these errors were encountered:
In the presence of missing values,
boxcox_trans
does not work:The issue is with the
if
clause. Becauseany(c(1:3, NA_real_) > 0)
returnsNA
, the condition cannot be evaluated. Addingna.rm = TRUE
should fix it. I'm happy to modify the R and the test file if that is helpful.The text was updated successfully, but these errors were encountered: