Closed bgreenwell closed 4 years ago
Issue seems related to this PR (which was patched in R 3.6.0): https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17548
Essentially, as.matrix.data.frame()
coerces TRUE
-> " TRUE"
whenever FALSE
is also present. Consequently, coercing " TRUE"
back to logical using as.logical()
results an NA
, as opposed to TRUE
. Simple fix would be to add
x[[name]] <- if(getRversion() <= "3.6.0") {
as.logical(trimws(x[[name]]))
} else {
as.logical(x[[name]])
}
See current status of tests: https://cran.r-project.org/web/checks/check_results_fastshap.html