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
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:
and lines by:
This should allow to set a new value to an existing level and notably to: