It would be great to have the option to let filter_slider know what to do with missing values (e.g. NA). I could imagine the options missing = c("top", "bottom", "hide"). There are times when a missing value could mean any value, which would be a reason one might want to include them - and top and bottom could provide the instruction about where to place them. Other times, most often, they will actually mean that the value is missing - and so I'd expect missing to be the default choice.
I noticed that you have previously mentioned that NA handling is TO DO
|
filter_slider <- function(id, label, sharedData, column, step = NULL, |
|
round = FALSE, ticks = TRUE, animate = FALSE, width = NULL, sep = ",", |
|
pre = NULL, post = NULL, timeFormat = NULL, |
|
timezone = NULL, dragRange = TRUE, min = NULL, max = NULL) |
|
{ |
|
# TODO: Check that this works well with factors |
|
# TODO: Handle empty data frame, NA/NaN/Inf/-Inf values |
...maybe this could be the way to do it?
It would be great to have the option to let
filter_sliderknow what to do with missing values (e.g.NA). I could imagine the optionsmissing = c("top", "bottom", "hide"). There are times when a missing value could mean any value, which would be a reason one might want to include them - andtopandbottomcould provide the instruction about where to place them. Other times, most often, they will actually mean that the value is missing - and so I'd expectmissingto be the default choice.I noticed that you have previously mentioned that NA handling is
TO DOcrosstalk/R/controls.R
Lines 301 to 307 in 46d12a6
...maybe this could be the way to do it?