`na_summary` fails for `data.frame` objects with logical columns
Closed this issue · 1 comments
Nelson-Gon commented
Describe the bug
na_summary
fails for logical columns.
To Reproduce
test_df <- data.frame(A= 1:4, B= as.logical(1, NA, 2, 4))
mde::na_summary(test_df)
Expected behavior
An output from na_summary
.
Unexpected behavior
Error: Problem with
summarise()
input..1
.
i..1 = across(everything(), ~get_na_means(.))
.
x no applicable method for 'get_na_means' applied to an object of class "logical"
System Details
Developer version https://github.com/Nelson-Gon/mde/tree/221eeab7c0ba19dd66a3186bfeb344c3a4032cb9
Nelson-Gon commented
This does not make logical
(pun intended) sense since NA
will always evaluate to a logical
making it hard if not impossible to do NA
calculations on logical
s.