Skip to content

NA handling in filter_slider and filter_select #166

@roaldarbol

Description

@roaldarbol

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

crosstalk/R/controls.R

Lines 301 to 307 in 46d12a6

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions