📜  r mutate ifelse 函数 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:50.984000             🧑  作者: Mango

代码示例1
df <- df %>% mutate(target_bool = case_when(salary == ">50K" ~ TRUE, salary == "<=50K" ~ FALSE))