This can be used to assign new categories or change existing ones based on an expression that is evaluated in the context of the data frame.

change_category(data, criteria, value, quiet = FALSE)

Arguments

data

(can be a grouped_by data set)

criteria

an expression to identify records whose category should be change to the new value

value

the new category value for the records matching the criteria