I think you're looking for something like this:
library(tidyverse)
df <- tibble(fever = c("mild","moderate","severe","very severe"))
newdf <- mutate(df,highfever = case_when(fever == "mild" | fever == "moderate" ~ 0,
fever == "severe" | fever == "very severe" ~ 1))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…