Skip to content

Feature Request: factor levels values edition #123

Description

@gitdemont

Dear datamods authors,

I am currently testing a slightly modified version of update_factor_server. The idea is to allow user to modifiy levels values of a factor variable (new behaviour) in addition to reorder them (current behaviour).

Hopefully (if no mistake...), this can be done replacing by:

grid %>% grid_editor(column = "Var1", type = "text")

and lines by:

data[[name_var]] <- factor((grid[["Var1"]][order(grid[["rowKey"]])])[as.integer(data[[variable]])], levels = unique(grid[["Var1"]]))
rv$data_grid <- as.data.frame(table(data[[variable]]))

This should allow to set a new value to an existing level and notably to:

  • set NA to a level
  • merge levels by providing the same value to 2+ levels

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions